Liking cljdoc? Tell your friends :D

kameleon.sql-reader


c-commentclj

(c-comment ps res [c & cs])

Handles characters in a C-style comment. If the character is a slash then there may be a nested comment. In that case, we switch to the c-comment-candidate state. If the character is an asterisk then we might have encountered a comment terminator. In that case, we siwtch to the c-comment-end-candidate state. Otherwise, we continue discarding characters.

Handles characters in a C-style comment.  If the character is a slash then
there may be a nested comment.  In that case, we switch to the
c-comment-candidate state.  If the character is an asterisk then we might
have encountered a comment terminator.  In that case, we siwtch to the
c-comment-end-candidate state.  Otherwise, we continue discarding
characters.
raw docstring

c-comment-candidateclj

(c-comment-candidate ps res [c & cs])

Handles what may be the start of a C-style comment. If a comment is really starting then we switch to the c-comment state. Otherwise, we go back to the previous state.

Handles what may be the start of a C-style comment.  If a comment is really
starting then we switch to the c-comment state.  Otherwise, we go back to
the previous state.
raw docstring

c-comment-end-candidateclj

(c-comment-end-candidate ps res [c & cs])

Handles what may or may not be the end of a C-style comment. If the comment is really ending at this point then the state switches back to whatever it was before the comment started. Otherwise, the state switches back to c-comment.

Handles what may or may not be the end of a C-style comment.  If the comment
is really ending at this point then the state switches back to whatever it
was before the comment started.  Otherwise, the state switches back to
c-comment.
raw docstring

char-seqclj

(char-seq rdr)

Returns a lazy sequence of characters obtained from a reader.

Returns a lazy sequence of characters obtained from a reader.
raw docstring

double-quoted-stringclj

(double-quoted-string res [c & cs])

Handles a double-quoted string. If the next character is a double quote then the string is being terminated and we switch back to the statement-base state. Otherwise, we continue accumulating characters in the string.

Handles a double-quoted string.  If the next character is a double quote
then the string is being terminated and we switch back to the statement-base
state.  Otherwise, we continue accumulating characters in the string.
raw docstring

escaped-charclj

(escaped-char res [c & cs])

Handles an escaped character in a single-quoted string.

Handles an escaped character in a single-quoted string.
raw docstring

exec-sql-statementclj

(exec-sql-statement & statements)

A wrapper around korma.core/exec-raw that logs the statement that is being executed if debugging is enabled.

A wrapper around korma.core/exec-raw that logs the statement that is being
executed if debugging is enabled.
raw docstring

is-spaceclj

(is-space c)

Determines whether or not a character is whitespace.

Determines whether or not a character is whitespace.
raw docstring

line-commentclj

(line-comment ps res [c & cs])

Handles a line comment, which continues until the end of the line is reached. If the current line is a newline then the comment terminates. Otherwise we continue discarding characters.

Handles a line comment, which continues until the end of the line is
reached.  If the current line is a newline then the comment terminates.
Otherwise we continue discarding characters.
raw docstring

line-comment-candidateclj

(line-comment-candidate ps res [c & cs])

Handles what may be the beginning of a line comment. If the next character is a hyphen then we switch to the line-comment state. Otherwise, we switch back to the previous state.

Handles what may be the beginning of a line comment.  If the next character
is a hyphen then we switch to the line-comment state.  Otherwise, we switch
back to the previous state.
raw docstring

load-sql-fileclj

(load-sql-file sql-file)

Loads a single SQL file into the database.

Loads a single SQL file into the database.
raw docstring

single-quoted-stringclj

(single-quoted-string res [c & cs])

Handles a single-quoted string. If the next character is a single quote then the string is being terminated and we switch back to the statement-base state. Otherwise, we continue accumulating characters in the string.

Handles a single-quoted string.  If the next character is a single quote
then the string is being terminated and we switch back to the statement-base
state.  Otherwise, we continue accumulating characters in the string.
raw docstring

sql-statementsclj

(sql-statements rdr)

Returns a sequence of SQL statements in the data that a reader points to.

Returns a sequence of SQL statements in the data that a reader points to.
raw docstring

statementclj

(statement res cs)

Extracts the next SQL statement from a character sequence, skipping any leading whitespace.

Extracts the next SQL statement from a character sequence, skipping any
leading whitespace.
raw docstring

statement-baseclj

(statement-base res [c & cs])

Handles the base state for identifying SQL statements. If there are no more characters then we return whatever we've accumulated so far. If the next character is a semicolon then the statement is complete, so we return it. If the next candidate is a slash then we may be at the start of a C-style comment, so we switch to the c-comment-candidate state. If the next character is a hyphen then we might be at the beginning of a line comment, so we switch to the line-comment-candidate state. If the next character is a single or double quote then we switch to the single-quoted-string or double-quoted-string state, respectively. Otherwise, we continue accumulating characters in the statement.

Handles the base state for identifying SQL statements.  If there are no more
characters then we return whatever we've accumulated so far.  If the next
character is a semicolon then the statement is complete, so we return it.
If the next candidate is a slash then we may be at the start of a C-style
comment, so we switch to the c-comment-candidate state.  If the next
character is a hyphen then we might be at the beginning of a line comment,
so we switch to the line-comment-candidate state.  If the next character is
a single or double quote then we switch to the single-quoted-string or
double-quoted-string state, respectively.  Otherwise, we continue
accumulating characters in the statement.
raw docstring

statement-beginningclj

(statement-beginning res [c & cs :as all])

Skips to the beginning of the next SQL statement.

Skips to the beginning of the next SQL statement.
raw docstring

test-fileclj

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close