Module sqlrelay

Function Index

affectedRows/0Returns the number of rows that were updated, inserted or deleted by the query.
alloc/7Initiates a connection to "server" on "port" or to the unix "socket" on the local machine and auths with "user" and "password".
autoCommitOff/0Instructs the database to wait for the client to tell it when to commit.
autoCommitOn/0Instructs the database to perform a commit after every successful query.
beginTransaction/0Begins a transaction.
bindFormat/0Returns a string representing the format of the bind variables used in the db.
cacheOff/0Sets query caching off.
cacheToFile/1Sets query caching on.
clearBinds/0Clears all bind variables.
closeResultSet/0Closes the current result set, if one is open.
colCount/0Returns the number of columns in the current result set.
commit/0Commits a transaction.
connectionErrorMessage/0If an operation failed and generated an error, the error message is available here.
connectionErrorNumber/0If an operation failed and generated an error, the error number is available here.
connectionFree/0Disconnects and ends the session if it hasn't been ended already.
countBindVariables/0Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.
cursorFree/0Destroys the cursor and cleans up all associated result set data.
dbHostName/0Returns the host name of the database.
dbIpAddress/0Returns the ip address of the database.
dbVersion/0Returns the version of the database.
debugOff/0Turns debugging off.
debugOn/0Causes verbose debugging information to be sent to standard output.
defineOutputBindBlob/1Defines a binary lob output bind variable.
defineOutputBindClob/1Defines a character lob output bind variable.
defineOutputBindCursor/1Defines a cursor output bind variable.
defineOutputBindDouble/1Defines a decimal output bind variable.
defineOutputBindInteger/1Defines an integer output bind variable.
defineOutputBindString/2Defines an output bind variable.
disableEncryption/0Disables encryption.
dontGetColumnInfo/0Tells the server not to send any column info (names, types, sizes).
enableKerberos/3Enables Kerberos authentication and encryption.
enableTls/7Enables TLS/SSL encryption, and optionally authentication.
endOfResultSet/0Returns false if part of the result set is still pending on the server and true if not.
endSession/0Ends the session.
errorMessage/0If a query failed and generated an error, the error message is available here.
errorNumber/0If a query failed and generated an error, the error number is available here.
executeQuery/0Execute the query that was previously prepared and bound.
fetchFromBindCursor/0Fetch from a cursor that was returned as an output bind variable.
firstRowIndex/0Returns the index of the first buffered row.
getCacheFileName/0Returns the name of the file containing the cached result set.
getClientInfo/0Returns the string that was set by setClientInfo().
getColumnInfo/0Tells the server to send column info.
getColumnIsAutoIncrementByIndex/1Returns true if the specified column auto-increments and false otherwise.
getColumnIsAutoIncrementByName/1Returns true if the specified column auto-increments and false otherwise.
getColumnIsBinaryByIndex/1Returns true if the specified column contains binary data and false otherwise.
getColumnIsBinaryByName/1Returns true if the specified column contains binary data and false otherwise.
getColumnIsNullableByIndex/1Returns true if the specified column can contain nulls and false otherwise.
getColumnIsNullableByName/1Returns true if the specified column can contain nulls and false otherwise.
getColumnIsPartOfKeyByIndex/1Returns true if the specified column is part of a composite key and false otherwise.
getColumnIsPartOfKeyByName/1Returns true if the specified column is part of a composite key and false otherwise.
getColumnIsPrimaryKeyByIndex/1Returns true if the specified column is a primary key and false otherwise.
getColumnIsPrimaryKeyByName/1Returns true if the specified column is a primary key and false otherwise.
getColumnIsUniqueByIndex/1Returns true if the specified column is unique and false otherwise.
getColumnIsUniqueByName/1Returns true if the specified column is unique and false otherwise.
getColumnIsUnsignedByIndex/1Returns true if the specified column is an unsigned number and false otherwise.
getColumnIsUnsignedByName/1Returns true if the specified column is an unsigned number and false otherwise.
getColumnIsZeroFilledByIndex/1Returns true if the specified column was created with the zero-fill flag and false otherwise.
getColumnIsZeroFilledByName/1Returns true if the specified column was created with the zero-fill flag and false otherwise.
getColumnLengthByIndex/1Returns the number of bytes required on the server to store the data for the specified column.
getColumnLengthByName/1Returns the number of bytes required on the server to store the data for the specified column.
getColumnName/1Returns the name of the specified column.
getColumnNames/0Returns a null terminated array of the column names of the current result set.
getColumnPrecisionByIndex/1Returns the precision of the specified column.
getColumnPrecisionByName/1Returns the precision of the specified column.
getColumnScaleByIndex/1Returns the scale of the specified column.
getColumnScaleByName/1Returns the scale of the specified column.
getColumnTypeByIndex/1Returns the type of the specified column.
getColumnTypeByName/1Returns the type of the specified column.
getConnectionPort/0Returns the inet port that the connection is communicating over.
getConnectionSocket/0Returns the unix socket that the connection is communicating over.
getCurrentDatabase/0Returns the database/schema that is currently in use.
getDebug/0Returns false if debugging is off and true if debugging is on.
getFieldAsDoubleByIndex/2Returns the specified field as a decimal.
getFieldAsDoubleByName/2Returns the specified field as a decimal.
getFieldAsIntegerByIndex/2Returns the specified field as an integer.
getFieldAsIntegerByName/2Returns the specified field as an integer.
getFieldByIndex/2Returns the specified field as a string.
getFieldByName/2Returns the specified field as a string.
getFieldLengthByIndex/2Returns the length of the specified field.
getFieldLengthByName/2Returns the length of the specified field.
getLongestByIndex/1Returns the length of the longest field in the specified column.
getLongestByName/1Returns the length of the longest field in the specified column.
getNullsAsEmptyStrings/0Tells the connection to return NULL fields and output bind variables as empty strings.
getNullsAsNulls/0Tells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings.
getOutputBindBlob/1Get the value stored in a previously defined binary lob output bind variable.
getOutputBindClob/1Get the value stored in a previously defined character lob output bind variable.
getOutputBindCursor/1Get the cursor associated with a previously defined output bind variable.
getOutputBindDouble/1Get the value stored in a previously defined decimal output bind variable.
getOutputBindInteger/1Get the value stored in a previously defined integer output bind variable.
getOutputBindLength/1Get the length of the value stored in a previously defined output bind variable.
getOutputBindString/1Get the value stored in a previously defined string output bind variable.
getResultSetBufferSize/0Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.
getResultSetId/0Returns the internal ID of this result set.
getRow/1Returns a tuple containing the value of the fields in the specified row.
getRowLengths/1Returns a null terminated array of the lengths of the fields in the specified row.
identify/0Returns the type of database: oracle, postgresql, mysql, etc.
inputBindBlob/3Defines a binary lob input bind variable.
inputBindClob/3Defines a character lob input bind variable.
inputBindDouble/4Defines a decimal input bind variable.
inputBindLong/2Defines a integer input bind variable.
inputBindString/2Defines a string input bind variable.
lowerCaseColumnNames/0Columns names are converted to lower case.
mixedCaseColumnNames/0Columns names are returned in the same case as they are defined in the database.
openCachedResultSet/1Opens a cached result set.
ping/0Returns true if the database is up and false if it's down.
prepareFileQuery/2Prepare to execute the contents of "path"/"filename".
prepareQuery/1Prepare to execute "query".
prepareQueryWithLength/2Prepare to execute "query" with length "length".
resumeCachedResultSet/2Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename".
resumeResultSet/1Resumes a result set previously left open using suspendSession().
resumeSession/2Resumes a session previously left open using suspendSession().
rollback/0Rolls back a transaction.
rowCount/0Returns the number of rows in the current result set (if the result set is being stepped through, this returns the number of rows processed so far).
selectDatabase/1Sets the current database/schema to "database".
sendFileQuery/2Sends the query in file "path"/"filename" directly and gets a result set.
sendQuery/1Sends "query" directly and gets a result set.
sendQueryWithLength/2Sends "query" with length "length" directly and gets a result set.
setCacheTtl/1Sets the time-to-live for cached result sets.
setClientInfo/1Allows you to set a string that will be passed to the server and ultimately included in server-side logging along with queries that were run by this instance of the client.
setDebugFile/1Allows you to specify a file to write debug to.
setResultSetBufferSize/1Sets the number of rows of the result set to buffer at a time.
subDouble/4Defines a decimal substitution variable.
subLong/2Defines an integer substitution variable.
subString/2Defines a string substitution variable.
suspendResultSet/0Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().
suspendSession/0Disconnects this connection from the current session but leaves the session open so that another connection can connect to it using resumeSession().
totalRows/0Returns the total number of rows that will be returned in the result set.
upperCaseColumnNames/0Columns names are converted to upper case.
validBind/1Returns true if "variable" was a valid bind variable of the query.
validateBinds/0If you are binding to any variables that might not actually be in your query, call this to ensure that the database won't try to bind them unless they really are in the query.

Function Details

affectedRows/0

affectedRows() -> any()

Returns the number of rows that were updated, inserted or deleted by the query. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. 0 is returned by databases which don't support this option.

alloc/7

alloc(Server, Port, Socket, User, Password, Retrytime, Tries) -> any()

Initiates a connection to "server" on "port" or to the unix "socket" on the local machine and auths with "user" and "password". Failed connections will be retried for "tries" times, waiting "retrytime" seconds between each try. If "tries" is 0 then retries will continue forever. If "retrytime" is 0 then retries will be attempted on a default interval. If the "socket" parameter is neither NULL nor "" then an attempt will be made to connect through it before attempting to connect to "server" on "port". If it is NULL or "" then no attempt will be made to connect through the socket.

autoCommitOff/0

autoCommitOff() -> any()

Instructs the database to wait for the client to tell it when to commit.

autoCommitOn/0

autoCommitOn() -> any()

Instructs the database to perform a commit after every successful query.

beginTransaction/0

beginTransaction() -> any()

Begins a transaction. Returns true if the begin succeeded, false if it failed. If the database automatically begins a new transaction when a commit or rollback is issued then this doesn't do anything unless SQL Relay is faking transaction blocks.

bindFormat/0

bindFormat() -> any()

Returns a string representing the format of the bind variables used in the db.

cacheOff/0

cacheOff() -> any()

Sets query caching off.

cacheToFile/1

cacheToFile(Filename) -> any()

Sets query caching on. Future queries will be cached to the file "filename".

A default time-to-live of 10 minutes is also set.

Note that once cacheToFile() is called, the result sets of all future queries will be cached to that file until another call to cacheToFile() changes which file to cache to or a call to cacheOff() turns off caching.

clearBinds/0

clearBinds() -> any()

Clears all bind variables.

closeResultSet/0

closeResultSet() -> any()

Closes the current result set, if one is open. Data that has been fetched already is still available but no more data may be fetched. Server side resources for the result set are freed as well.

colCount/0

colCount() -> any()

Returns the number of columns in the current result set.

commit/0

commit() -> any()

Commits a transaction. Returns true if the commit succeeded, false if it failed.

connectionErrorMessage/0

connectionErrorMessage() -> any()

If an operation failed and generated an error, the error message is available here. If there is no error then this method returns NULL.

connectionErrorNumber/0

connectionErrorNumber() -> any()

If an operation failed and generated an error, the error number is available here. If there is no error then this method returns 0.

connectionFree/0

connectionFree() -> any()

Disconnects and ends the session if it hasn't been ended already.

countBindVariables/0

countBindVariables() -> any()

Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.

cursorFree/0

cursorFree() -> any()

Destroys the cursor and cleans up all associated result set data.

dbHostName/0

dbHostName() -> any()

Returns the host name of the database.

dbIpAddress/0

dbIpAddress() -> any()

Returns the ip address of the database.

dbVersion/0

dbVersion() -> any()

Returns the version of the database.

debugOff/0

debugOff() -> any()

Turns debugging off.

debugOn/0

debugOn() -> any()

Causes verbose debugging information to be sent to standard output. Another way to do this is to start a query with "-- debug\n". Yet another way is to set the environment variable SQLR_CLIENT_DEBUG to "ON"

defineOutputBindBlob/1

defineOutputBindBlob(Variable) -> any()

Defines a binary lob output bind variable.

defineOutputBindClob/1

defineOutputBindClob(Variable) -> any()

Defines a character lob output bind variable.

defineOutputBindCursor/1

defineOutputBindCursor(Variable) -> any()

Defines a cursor output bind variable.

defineOutputBindDouble/1

defineOutputBindDouble(Variable) -> any()

Defines a decimal output bind variable.

defineOutputBindInteger/1

defineOutputBindInteger(Variable) -> any()

Defines an integer output bind variable.

defineOutputBindString/2

defineOutputBindString(Variable, Length) -> any()

Defines an output bind variable. "bufferlength" bytes will be reserved to store the value.

disableEncryption/0

disableEncryption() -> any()

Disables encryption.

dontGetColumnInfo/0

dontGetColumnInfo() -> any()

Tells the server not to send any column info (names, types, sizes). If you don't need that info, you should call this method to improve performance.

enableKerberos/3

enableKerberos(Service, Mech, Flags) -> any()

Enables Kerberos authentication and encryption.

"service" indicates the Kerberos service name of the SQL Relay server. If left empty or NULL then the service name "sqlrelay" will be used. "sqlrelay" is the default service name of the SQL Relay server. Note that on Windows platforms the service name must be fully qualified, including the host and realm name. For example: "sqlrelay/sqlrserver.firstworks.com@AD.FIRSTWORKS.COM".

"mech" indicates the specific Kerberos mechanism to use. On Linux/Unix platforms, this should be a string representation of the mechnaism's OID, such as:

{ 1 2 840 113554 1 2 2 }

On Windows platforms, this should be a string like:

Kerberos

If left empty or NULL then the default mechanism will be used. Only set this if you know that you have a good reason to.

"flags" indicates what Kerberos flags to use. Multiple flags may be specified, separated by commas. If left empty or NULL then a defalt set of flags will be used. Only set this if you know that you have a good reason to.

Valid flags include:

For a full list of flags, consult the GSSAPI documentation, though note that only the flags listed above are supported on Windows.

enableTls/7

enableTls(Version, Cert, Password, Ciphers, Validate, Ca, Depth) -> any()

Enables TLS/SSL encryption, and optionally authentication.

"version" specifies the TLS/SSL protocol version that the client will attempt to use. Valid values include SSL2, SSL3, TLS1, TLS1.1, TLS1.2 or any more recent version of TLS, as supported by and enabled in the underlying TLS/SSL library. If left blank or empty then the highest supported version will be negotiated.

"cert" is the file name of the certificate chain file to send to the SQL Relay server. This is only necessary if the SQL Relay server is configured to authenticate and authorize clients by certificate.

If "cert" contains a password-protected private key, then "password" may be supplied to access it. If the private key is not password-protected, then this argument is ignored, and may be left empty or NULL.

"ciphers" is a list of ciphers to allow. Ciphers may be separated by spaces, commas, or colons. If "ciphers" is empty or NULL then a default set is used. Only set this if you know that you have a good reason to.

For a list of valid ciphers on Linux/Unix platforms, see:

man ciphers

For a list of valid ciphers on Windows platforms, see:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549%28v=vs.85%29.aspx

On Windows platforms, the ciphers (alg_id's) should omit CALG_ and may be given with underscores or dashes.

For example: 3DES_112

"validate" indicates whether to validate the SQL Relay's server certificate, and may be set to one of the following:

"ca" is the location of a certificate authority file to use, in addition to the system's root certificates, when validating the SQL Relay server's certificate. This is useful if the SQL Relay server's certificate is self-signed.

On Windows, "ca" must be a file name.

On non-Windows systems, "ca" can be either a file or directory name. If it is a directory name, then all certificate authority files found in that directory will be used. If it a file name, then only that file will be used.

Note that the supported "cert" and "ca" file formats may vary between platforms. A variety of file formats are generally supported on Linux/Unix platfoms (.pem, .pfx, etc.) but only the .pfx format is currently supported on Windows.

endOfResultSet/0

endOfResultSet() -> any()

Returns false if part of the result set is still pending on the server and true if not. This method can only return false if setResultSetBufferSize() has been called with a parameter other than 0.

endSession/0

endSession() -> any()

Ends the session.

errorMessage/0

errorMessage() -> any()

If a query failed and generated an error, the error message is available here. If the query succeeded then this method returns NULL.

errorNumber/0

errorNumber() -> any()

If a query failed and generated an error, the error number is available here. If there is no error then this method returns 0.

executeQuery/0

executeQuery() -> any()

Execute the query that was previously prepared and bound.

fetchFromBindCursor/0

fetchFromBindCursor() -> any()

Fetch from a cursor that was returned as an output bind variable.

firstRowIndex/0

firstRowIndex() -> any()

Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.

getCacheFileName/0

getCacheFileName() -> any()

Returns the name of the file containing the cached result set.

getClientInfo/0

getClientInfo() -> any()

Returns the string that was set by setClientInfo().

getColumnInfo/0

getColumnInfo() -> any()

Tells the server to send column info.

getColumnIsAutoIncrementByIndex/1

getColumnIsAutoIncrementByIndex(Col) -> any()

Returns true if the specified column auto-increments and false otherwise.

getColumnIsAutoIncrementByName/1

getColumnIsAutoIncrementByName(Col) -> any()

Returns true if the specified column auto-increments and false otherwise.

getColumnIsBinaryByIndex/1

getColumnIsBinaryByIndex(Col) -> any()

Returns true if the specified column contains binary data and false otherwise.

getColumnIsBinaryByName/1

getColumnIsBinaryByName(Col) -> any()

Returns true if the specified column contains binary data and false otherwise.

getColumnIsNullableByIndex/1

getColumnIsNullableByIndex(Col) -> any()

Returns true if the specified column can contain nulls and false otherwise.

getColumnIsNullableByName/1

getColumnIsNullableByName(Col) -> any()

Returns true if the specified column can contain nulls and false otherwise.

getColumnIsPartOfKeyByIndex/1

getColumnIsPartOfKeyByIndex(Col) -> any()

Returns true if the specified column is part of a composite key and false otherwise.

getColumnIsPartOfKeyByName/1

getColumnIsPartOfKeyByName(Col) -> any()

Returns true if the specified column is part of a composite key and false otherwise.

getColumnIsPrimaryKeyByIndex/1

getColumnIsPrimaryKeyByIndex(Col) -> any()

Returns true if the specified column is a primary key and false otherwise.

getColumnIsPrimaryKeyByName/1

getColumnIsPrimaryKeyByName(Col) -> any()

Returns true if the specified column is a primary key and false otherwise.

getColumnIsUniqueByIndex/1

getColumnIsUniqueByIndex(Col) -> any()

Returns true if the specified column is unique and false otherwise.

getColumnIsUniqueByName/1

getColumnIsUniqueByName(Col) -> any()

Returns true if the specified column is unique and false otherwise.

getColumnIsUnsignedByIndex/1

getColumnIsUnsignedByIndex(Col) -> any()

Returns true if the specified column is an unsigned number and false otherwise.

getColumnIsUnsignedByName/1

getColumnIsUnsignedByName(Col) -> any()

Returns true if the specified column is an unsigned number and false otherwise.

getColumnIsZeroFilledByIndex/1

getColumnIsZeroFilledByIndex(Col) -> any()

Returns true if the specified column was created with the zero-fill flag and false otherwise.

getColumnIsZeroFilledByName/1

getColumnIsZeroFilledByName(Col) -> any()

Returns true if the specified column was created with the zero-fill flag and false otherwise.

getColumnLengthByIndex/1

getColumnLengthByIndex(Col) -> any()

Returns the number of bytes required on the server to store the data for the specified column

getColumnLengthByName/1

getColumnLengthByName(Col) -> any()

Returns the number of bytes required on the server to store the data for the specified column

getColumnName/1

getColumnName(Col) -> any()

Returns the name of the specified column.

getColumnNames/0

getColumnNames() -> any()

Returns a null terminated array of the column names of the current result set.

getColumnPrecisionByIndex/1

getColumnPrecisionByIndex(Col) -> any()

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

getColumnPrecisionByName/1

getColumnPrecisionByName(Col) -> any()

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

getColumnScaleByIndex/1

getColumnScaleByIndex(Col) -> any()

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

getColumnScaleByName/1

getColumnScaleByName(Col) -> any()

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

getColumnTypeByIndex/1

getColumnTypeByIndex(Col) -> any()

Returns the type of the specified column.

getColumnTypeByName/1

getColumnTypeByName(Col) -> any()

Returns the type of the specified column.

getConnectionPort/0

getConnectionPort() -> any()

Returns the inet port that the connection is communicating over. This parameter may be passed to another connection for use in the resumeSession() method. Note: The value this method returns is only valid after a call to suspendSession().

getConnectionSocket/0

getConnectionSocket() -> any()

Returns the unix socket that the connection is communicating over. This parameter may be passed to another connection for use in the resumeSession() method. Note: The value this method returns is only valid after a call to suspendSession().

getCurrentDatabase/0

getCurrentDatabase() -> any()

Returns the database/schema that is currently in use.

getDebug/0

getDebug() -> any()

Returns false if debugging is off and true if debugging is on.

getFieldAsDoubleByIndex/2

getFieldAsDoubleByIndex(Row, Col) -> any()

Returns the specified field as a decimal.

getFieldAsDoubleByName/2

getFieldAsDoubleByName(Row, Col) -> any()

Returns the specified field as a decimal.

getFieldAsIntegerByIndex/2

getFieldAsIntegerByIndex(Row, Col) -> any()

Returns the specified field as an integer.

getFieldAsIntegerByName/2

getFieldAsIntegerByName(Row, Col) -> any()

Returns the specified field as an integer.

getFieldByIndex/2

getFieldByIndex(Row, Col) -> any()

Returns the specified field as a string.

getFieldByName/2

getFieldByName(Row, Col) -> any()

Returns the specified field as a string.

getFieldLengthByIndex/2

getFieldLengthByIndex(Row, Col) -> any()

Returns the length of the specified field.

getFieldLengthByName/2

getFieldLengthByName(Row, Col) -> any()

Returns the length of the specified field.

getLongestByIndex/1

getLongestByIndex(Col) -> any()

Returns the length of the longest field in the specified column.

getLongestByName/1

getLongestByName(Col) -> any()

Returns the length of the longest field in the specified column.

getNullsAsEmptyStrings/0

getNullsAsEmptyStrings() -> any()

Tells the connection to return NULL fields and output bind variables as empty strings. This is the default.

getNullsAsNulls/0

getNullsAsNulls() -> any()

Tells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings.

getOutputBindBlob/1

getOutputBindBlob(Variable) -> any()

Get the value stored in a previously defined binary lob output bind variable.

getOutputBindClob/1

getOutputBindClob(Variable) -> any()

Get the value stored in a previously defined character lob output bind variable.

getOutputBindCursor/1

getOutputBindCursor(Variable) -> any()

Get the cursor associated with a previously defined output bind variable.

getOutputBindDouble/1

getOutputBindDouble(Variable) -> any()

Get the value stored in a previously defined decimal output bind variable.

getOutputBindInteger/1

getOutputBindInteger(Variable) -> any()

Get the value stored in a previously defined integer output bind variable.

getOutputBindLength/1

getOutputBindLength(Variable) -> any()

Get the length of the value stored in a previously defined output bind variable.

getOutputBindString/1

getOutputBindString(Variable) -> any()

Get the value stored in a previously defined string output bind variable.

getResultSetBufferSize/0

getResultSetBufferSize() -> any()

Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.

getResultSetId/0

getResultSetId() -> any()

Returns the internal ID of this result set. This parameter may be passed to another cursor for use in the resumeResultSet() method. Note: The value this method returns is only valid after a call to suspendResultSet().

getRow/1

getRow(Row) -> any()

Returns a tuple containing the value of the fields in the specified row.

getRowLengths/1

getRowLengths(Row) -> any()

Returns a null terminated array of the lengths of the fields in the specified row.

identify/0

identify() -> any()

Returns the type of database: oracle, postgresql, mysql, etc.

inputBindBlob/3

inputBindBlob(Variable, Value, Size) -> any()

Defines a binary lob input bind variable.

inputBindClob/3

inputBindClob(Variable, Value, Size) -> any()

Defines a character lob input bind variable.

inputBindDouble/4

inputBindDouble(Variable, Value, Precision, Scale) -> any()

Defines a decimal input bind variable. (If you don't have the precision and scale then set them both 0. However in that case you may get unexpected rounding behavior if the server is faking binds.)

inputBindLong/2

inputBindLong(Variable, Value) -> any()

Defines a integer input bind variable.

inputBindString/2

inputBindString(Variable, Value) -> any()

Defines a string input bind variable.

lowerCaseColumnNames/0

lowerCaseColumnNames() -> any()

Columns names are converted to lower case.

mixedCaseColumnNames/0

mixedCaseColumnNames() -> any()

Columns names are returned in the same case as they are defined in the database. This is the default.

openCachedResultSet/1

openCachedResultSet(Filename) -> any()

Opens a cached result set. Returns true on success and false on failure.

ping/0

ping() -> any()

Returns true if the database is up and false if it's down.

prepareFileQuery/2

prepareFileQuery(Path, Filename) -> any()

Prepare to execute the contents of "path"/"filename". Returns false if the file couldn't be opened.

prepareQuery/1

prepareQuery(Query) -> any()

Prepare to execute "query".

prepareQueryWithLength/2

prepareQueryWithLength(Query, Length) -> any()

Prepare to execute "query" with length "length". This method must be used if the query contains binary data.

resumeCachedResultSet/2

resumeCachedResultSet(Id, Filename) -> any()

Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename". Returns true on success and false on failure.

resumeResultSet/1

resumeResultSet(Id) -> any()

Resumes a result set previously left open using suspendSession(). Returns true on success and false on failure.

resumeSession/2

resumeSession(Port, Socket) -> any()

Resumes a session previously left open using suspendSession(). Returns true on success and false on failure.

rollback/0

rollback() -> any()

Rolls back a transaction. Returns true if the rollback succeeded, false if it failed.

rowCount/0

rowCount() -> any()

Returns the number of rows in the current result set (if the result set is being stepped through, this returns the number of rows processed so far).

selectDatabase/1

selectDatabase(Database) -> any()

Sets the current database/schema to "database".

sendFileQuery/2

sendFileQuery(Path, Filename) -> any()

Sends the query in file "path"/"filename" directly and gets a result set.

sendQuery/1

sendQuery(Query) -> any()

Sends "query" directly and gets a result set.

sendQueryWithLength/2

sendQueryWithLength(Query, Length) -> any()

Sends "query" with length "length" directly and gets a result set. This method must be used if the query contains binary data.

setCacheTtl/1

setCacheTtl(Ttl) -> any()

Sets the time-to-live for cached result sets. The sqlr-cachemanger will remove each cached result set "ttl" seconds after it's created, provided it's scanning the directory containing the cache files.

setClientInfo/1

setClientInfo(ClientInfo) -> any()

Allows you to set a string that will be passed to the server and ultimately included in server-side logging along with queries that were run by this instance of the client.

setDebugFile/1

setDebugFile(FileName) -> any()

Allows you to specify a file to write debug to. Setting "filename" to NULL or an empty string causes debug to be written to standard output (the default).

setResultSetBufferSize/1

setResultSetBufferSize(Rows) -> any()

Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.

subDouble/4

subDouble(Variable, Value, Precision, Scale) -> any()

Defines a decimal substitution variable.

subLong/2

subLong(Variable, Value) -> any()

Defines an integer substitution variable.

subString/2

subString(Variable, Value) -> any()

Defines a string substitution variable.

suspendResultSet/0

suspendResultSet() -> any()

Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().

suspendSession/0

suspendSession() -> any()

Disconnects this connection from the current session but leaves the session open so that another connection can connect to it using resumeSession().

totalRows/0

totalRows() -> any()

Returns the total number of rows that will be returned in the result set. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. 0 is returned by databases which don't support this option.

upperCaseColumnNames/0

upperCaseColumnNames() -> any()

Columns names are converted to upper case.

validBind/1

validBind(Variable) -> any()

Returns true if "variable" was a valid bind variable of the query.

validateBinds/0

validateBinds() -> any()

If you are binding to any variables that might not actually be in your query, call this to ensure that the database won't try to bind them unless they really are in the query. There is a performance penalty for calling this method.


Generated by EDoc, Dec 23 2016, 00:36:07.