|
SQL Relay node.js API
|
Public Member Functions | |
| SQLRCursor (var sqlrc) | |
| function | setResultSetBufferSize (var rows) |
| function | getResultSetBufferSize () |
| function | dontGetColumnInfo () |
| function | getColumnInfo () |
| function | mixedCaseColumnNames () |
| function | upperCaseColumnNames () |
| function | lowerCaseColumnNames () |
| function | cacheToFile (var filename) |
| function | setCacheTtl (var ttl) |
| function | getCacheFileName () |
| function | cacheOff () |
| function | getDatabaseList (var wild) |
| function | getCatalogList (var wild) |
| function | getSchemaList (var schemas) |
| function | getTableTypeList () |
| function | getTableList (var wild) |
| function | getTypeInfoList (var type) |
| function | getColumnList (var table, var wild) |
| function | getPrimaryKeysList (var table, var columns) |
| function | getKeyAndIndexList (var table, var qualifier) |
| function | getProcedureList (var procedures) |
| function | getProcedureParameterList (var procedure, var parameters) |
| function | sendQuery (var query) |
| function | sendQuery (var query, var length) |
| function | sendFileQuery (var path, var filename) |
| function | prepareQuery (var query) |
| function | prepareQuery (var query, var length) |
| function | prepareFileQuery (var path, var filename) |
| function | substitution (var variable, var value) |
| function | substitution (var variable, var value) |
| function | substitution (var variable, var value, var precision, var scale) |
| function | substitutions (var variables, var values) |
| function | substitutions (var variables, var values) |
| function | substitutions (var variables, var values, var precisions, var scales) |
| function | inputBind (var variable, var value) |
| function | inputBind (var variable, var value, var valuelength) |
| function | inputBind (var variable, var value) |
| function | inputBind (var variable, var value, var precision, var scale) |
| function | inputBind (var variable, var year, var month, var day, var hour, var minute, var second, var microsecond, var tz, var isnegative) |
| function | inputBindBlob (var variable, var value, var size) |
| function | inputBindClob (var variable, var value, var size) |
| function | inputBinds (var variables, var values) |
| function | inputBinds (var variables, const var values) |
| function | inputBinds (var variables, const var values, const var precisions, const var scales) |
| function | defineOutputBindString (var variable, var bufferlength) |
| function | defineOutputBindInteger (var variable) |
| function | defineOutputBindDouble (var variable) |
| function | defineOutputBindDate (var variable) |
| function | defineOutputBindBlob (var variable) |
| function | defineOutputBindClob (var variable) |
| function | defineOutputBindCursor (var variable) |
| function | clearBinds () |
| function | countBindVariables () |
| function | validateBinds () |
| function | validBind (var variable) |
| function | executeQuery () |
| function | fetchFromBindCursor () |
| function | getOutputBindString (var variable) |
| function | getOutputBindInteger (var variable) |
| function | getOutputBindDouble (var variable) |
| function | getOutputBindDate (var variable, var year, var month, var day, var hour, var minute, var second, var microsecond, var tz) |
| function | getOutputBindBlob (var variable) |
| function | getOutputBindClob (var variable) |
| function | getOutputBindLength (var variable) |
| function | getOutputBindCursor (var variable) |
| function | getOutputBindDateYear (var variable) |
| function | getOutputBindDateMonth (var variable) |
| function | getOutputBindDateDay (var variable) |
| function | getOutputBindDateHour (var variable) |
| function | getOutputBindDateMinute (var variable) |
| function | getOutputBindDateSecond (var variable) |
| function | getOutputBindDateMicrosecond (var variable) |
| function | getOutputBindDateTz (var variable) |
| function | getOutputBindDateIsNegative (var variable) |
| function | openCachedResultSet (var filename) |
| function | colCount () |
| function | rowCount () |
| function | totalRows () |
| function | affectedRows () |
| function | firstRowIndex () |
| function | endOfResultSet () |
| function | nextResultSet () |
| function | errorMessage () |
| function | errorNumber () |
| function | getNullsAsEmptyStrings () |
| function | getNullsAsNulls () |
| function | getField (var row, var col) |
| function | getField (var row, var col) |
| function | getFieldIgnoringCase (var row, var col) |
| function | getFieldAsInteger (var row, var col) |
| function | getFieldAsInteger (var row, var col) |
| function | getFieldAsDouble (var row, var col) |
| function | getFieldAsDouble (var row, var col) |
| function | getFieldAsBoolean (var row, var col) |
| function | getFieldAsBoolean (var row, var col) |
| function | getFieldAsDateYear (var row, var col) |
| function | getFieldAsDateYear (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMonth (var row, var col) |
| function | getFieldAsDateMonth (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateDay (var row, var col) |
| function | getFieldAsDateDay (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateHour (var row, var col) |
| function | getFieldAsDateHour (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMinute (var row, var col) |
| function | getFieldAsDateMinute (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateSecond (var row, var col) |
| function | getFieldAsDateSecond (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMicrosecond (var row, var col) |
| function | getFieldAsDateMicrosecond (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateIsNegative (var row, var col) |
| function | getFieldAsDateIsNegative (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsIntegerIgnoringCase (var row, var col) |
| function | getFieldAsDoubleIgnoringCase (var row, var col) |
| function | getFieldAsBooleanIgnoringCase (var row, var col) |
| function | getFieldAsDateYearIgnoringCase (var row, var col) |
| function | getFieldAsDateYearIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMonthIgnoringCase (var row, var col) |
| function | getFieldAsDateMonthIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateDayIgnoringCase (var row, var col) |
| function | getFieldAsDateDayIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateHourIgnoringCase (var row, var col) |
| function | getFieldAsDateHourIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMinuteIgnoringCase (var row, var col) |
| function | getFieldAsDateMinuteIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateSecondIgnoringCase (var row, var col) |
| function | getFieldAsDateSecondIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateMicrosecondIgnoringCase (var row, var col) |
| function | getFieldAsDateMicrosecondIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldAsDateIsNegativeIgnoringCase (var row, var col) |
| function | getFieldAsDateIsNegativeIgnoringCase (var row, var col, var ddmm, var yyyyddmm, var datedelimiters) |
| function | getFieldLength (var row, var col) |
| function | getFieldLength (var row, var col) |
| function | getRow (var row) |
| function | getRowLengths (var row) |
| function | getColumnNames () |
| function | getColumnName (var col) |
| function | getColumnType (var col) |
| function | getColumnType (var col) |
| function | getColumnLength (var col) |
| function | getColumnLength (var col) |
| function | getColumnPrecision (var col) |
| function | getColumnPrecision (var col) |
| function | getColumnScale (var col) |
| function | getColumnScale (var col) |
| function | getColumnIsNullable (var col) |
| function | getColumnIsNullable (var col) |
| function | getColumnIsPrimaryKey (var col) |
| function | getColumnIsPrimaryKey (var col) |
| function | getColumnIsUnique (var col) |
| function | getColumnIsUnique (var col) |
| function | getColumnIsPartOfKey (var col) |
| function | getColumnIsPartOfKey (var col) |
| function | getColumnIsUnsigned (var col) |
| function | getColumnIsUnsigned (var col) |
| function | getColumnIsZeroFilled (var col) |
| function | getColumnIsZeroFilled (var col) |
| function | getColumnIsBinary (var col) |
| function | getColumnIsBinary (var col) |
| function | getColumnIsAutoIncrement (var col) |
| function | getColumnIsAutoIncrement (var col) |
| function | getLongest (var col) |
| function | getLongest (var col) |
| function | suspendResultSet () |
| function | getResultSetId () |
| function | resumeResultSet (var id) |
| function | resumeCachedResultSet (var id, var filename) |
| function | closeResultSet () |
| SQLRCursor::SQLRCursor | ( | var | sqlrc | ) |
Creates a cursor to run queries and fetch result sets using connecton "sqlrc".
| function SQLRCursor::affectedRows | ( | ) |
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.
| function SQLRCursor::cacheOff | ( | ) |
Sets query caching off.
| function SQLRCursor::cacheToFile | ( | var | filename | ) |
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.
| function SQLRCursor::clearBinds | ( | ) |
Clears all bind variables.
| function SQLRCursor::closeResultSet | ( | ) |
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.
| function SQLRCursor::colCount | ( | ) |
Returns the number of columns in the current result set.
| function SQLRCursor::countBindVariables | ( | ) |
Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.
| function SQLRCursor::defineOutputBindBlob | ( | var | variable | ) |
Defines a binary lob output bind variable.
| function SQLRCursor::defineOutputBindClob | ( | var | variable | ) |
Defines a character lob output bind variable.
| function SQLRCursor::defineOutputBindCursor | ( | var | variable | ) |
Defines a cursor output bind variable.
| function SQLRCursor::defineOutputBindDate | ( | var | variable | ) |
Defines a date output bind variable.
| function SQLRCursor::defineOutputBindDouble | ( | var | variable | ) |
Defines a decimal output bind variable.
| function SQLRCursor::defineOutputBindInteger | ( | var | variable | ) |
Defines an integer output bind variable.
| function SQLRCursor::defineOutputBindString | ( | var | variable, |
| var | bufferlength ) |
Defines an output bind variable. "bufferlength" bytes will be reserved to store the value.
| function SQLRCursor::dontGetColumnInfo | ( | ) |
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.
| function SQLRCursor::endOfResultSet | ( | ) |
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.
| function SQLRCursor::errorMessage | ( | ) |
If a query failed and generated an error, the error message is available here. If the query succeeded then this method returns NULL.
| function SQLRCursor::errorNumber | ( | ) |
If a query failed and generated an error, the error number is available here. If there is no error then this method returns 0.
| function SQLRCursor::executeQuery | ( | ) |
Execute the query that was previously prepared and bound.
| function SQLRCursor::fetchFromBindCursor | ( | ) |
Fetch from a cursor that was returned as an output bind variable.
| function SQLRCursor::firstRowIndex | ( | ) |
Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.
| function SQLRCursor::getCacheFileName | ( | ) |
Returns the name of the file containing the cached result set.
| function SQLRCursor::getCatalogList | ( | var | wild | ) |
Generates a result set containing catalogs that match the pattern "catalog".
The result set will contain the following columns:
If "catalog" is empty or NULL then a result set containing all catalogs will be returned.
If SQL Relay doesn't support getting a list of catalogs for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getColumnInfo | ( | ) |
Tells the server to send column info.
| function SQLRCursor::getColumnIsAutoIncrement | ( | var | col | ) |
Returns true if the specified column auto-increments and false otherwise.
| function SQLRCursor::getColumnIsAutoIncrement | ( | var | col | ) |
Returns true if the specified column auto-increments and false otherwise.
| function SQLRCursor::getColumnIsBinary | ( | var | col | ) |
Returns true if the specified column contains binary data and false otherwise.
| function SQLRCursor::getColumnIsBinary | ( | var | col | ) |
Returns true if the specified column contains binary data and false otherwise.
| function SQLRCursor::getColumnIsNullable | ( | var | col | ) |
Returns true if the specified column can contain nulls and false otherwise.
| function SQLRCursor::getColumnIsNullable | ( | var | col | ) |
Returns true if the specified column can contain nulls and false otherwise.
| function SQLRCursor::getColumnIsPartOfKey | ( | var | col | ) |
Returns true if the specified column is part of a composite key and false otherwise.
| function SQLRCursor::getColumnIsPartOfKey | ( | var | col | ) |
Returns true if the specified column is part of a composite key and false otherwise.
| function SQLRCursor::getColumnIsPrimaryKey | ( | var | col | ) |
Returns true if the specified column is a primary key and false otherwise.
| function SQLRCursor::getColumnIsPrimaryKey | ( | var | col | ) |
Returns true if the specified column is a primary key and false otherwise.
| function SQLRCursor::getColumnIsUnique | ( | var | col | ) |
Returns true if the specified column is unique and false otherwise.
| function SQLRCursor::getColumnIsUnique | ( | var | col | ) |
Returns true if the specified column is unique and false otherwise.
| function SQLRCursor::getColumnIsUnsigned | ( | var | col | ) |
Returns true if the specified column is an unsigned number and false otherwise.
| function SQLRCursor::getColumnIsUnsigned | ( | var | col | ) |
Returns true if the specified column is an unsigned number and false otherwise.
| function SQLRCursor::getColumnIsZeroFilled | ( | var | col | ) |
Returns true if the specified column was created with the zero-fill flag and false otherwise.
| function SQLRCursor::getColumnIsZeroFilled | ( | var | col | ) |
Returns true if the specified column was created with the zero-fill flag and false otherwise.
| function SQLRCursor::getColumnLength | ( | var | col | ) |
Returns the number of bytes required on the server to store the data for the specified column
| function SQLRCursor::getColumnLength | ( | var | col | ) |
Returns the number of bytes required on the server to store the data for the specified column
| function SQLRCursor::getColumnList | ( | var | table, |
| var | wild ) |
Generates a result set containing the columns of "table", which match the pattern "columns".
The result set will contain the following columns:
If "columns" is empty or NULL then a list of all columns of "table" will be returned.
If SQL Relay doesn't support getting a list of columns for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getColumnName | ( | var | col | ) |
Returns the name of the specified column.
| function SQLRCursor::getColumnNames | ( | ) |
Returns a null terminated array of the column names of the current result set.
| function SQLRCursor::getColumnPrecision | ( | var | col | ) |
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.
| function SQLRCursor::getColumnPrecision | ( | var | col | ) |
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.
| function SQLRCursor::getColumnScale | ( | var | col | ) |
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.
| function SQLRCursor::getColumnScale | ( | var | col | ) |
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.
| function SQLRCursor::getColumnType | ( | var | col | ) |
Returns the type of the specified column.
| function SQLRCursor::getColumnType | ( | var | col | ) |
Returns the type of the specified column.
| function SQLRCursor::getDatabaseList | ( | var | wild | ) |
Generates a result set containing databases that match the pattern "databases".
The result set will contain the following columns:
If "databases" is empty or NULL then a result set containing all databases will be returned.
May actually return a result set of catalogs or schemas, depending on whether the backend database equates "database" with catalog or schema.
See getDatabaseIsSchema().
If SQL Relay doesn't support getting a list of databases for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getField | ( | var | row, |
| var | col ) |
Returns the specified field as a string.
| function SQLRCursor::getField | ( | var | row, |
| var | col ) |
Returns the specified field as a string
| function SQLRCursor::getFieldAsBoolean | ( | var | row, |
| var | col ) |
Returns the specified field as a boolean.
| function SQLRCursor::getFieldAsBoolean | ( | var | row, |
| var | col ) |
Returns the specified field as a boolean.
| function SQLRCursor::getFieldAsBooleanIgnoringCase | ( | var | row, |
| var | col ) |
Returns the specified field as a boolean, ignoring case of "col".
| function SQLRCursor::getFieldAsDateDay | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the day component.
| function SQLRCursor::getFieldAsDateDay | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the day component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateDayIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the day component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateDayIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the day component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateHour | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the hour component.
| function SQLRCursor::getFieldAsDateHour | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the hour component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateHourIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the hour component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateHourIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the hour component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateIsNegative | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns whether the hour component is negative.
| function SQLRCursor::getFieldAsDateIsNegative | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns whether the hour component is negative.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateIsNegativeIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns whether the hour component is negative, ignoring case of "col".
| function SQLRCursor::getFieldAsDateIsNegativeIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns whether the hour component is negative, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMicrosecond | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the microsecond component.
| function SQLRCursor::getFieldAsDateMicrosecond | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the microsecond component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMicrosecondIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the microsecond component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateMicrosecondIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the microsecond component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMinute | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the minute component.
| function SQLRCursor::getFieldAsDateMinute | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the minute component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMinuteIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the minute component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateMinuteIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the minute component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMonth | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the month component.
| function SQLRCursor::getFieldAsDateMonth | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the month component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateMonthIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the month component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateMonthIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the month component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateSecond | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the second component.
| function SQLRCursor::getFieldAsDateSecond | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the second component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateSecondIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the second component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateSecondIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the second component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateYear | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the year component.
| function SQLRCursor::getFieldAsDateYear | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the year component.
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDateYearIgnoringCase | ( | var | row, |
| var | col ) |
Interprets the specified field as a date and returns the year component, ignoring case of "col".
| function SQLRCursor::getFieldAsDateYearIgnoringCase | ( | var | row, |
| var | col, | ||
| var | ddmm, | ||
| var | yyyyddmm, | ||
| var | datedelimiters ) |
Interprets the specified field as a date and returns the year component, ignoring case of "col".
If "ddmm" is set true then the date format is assumed to be dd/mm/yyyy rather than mm/dd/yyyy when a date with a trailing year is encountered.
If "yyyyddmm" is set true then the date format is assumed to be yyyy/dd/mm rather than yyyy/mm/dd when a date with a leading year is encountered.
"datedelimiters" may be set to a set of valid date delimiters and may contain any combination of '/', '-', '.', and ':'. Eg. "/-" would mean that only '/' and '-' are valid date delimiters. If left NULL then it defaults to "/-.:".
| function SQLRCursor::getFieldAsDouble | ( | var | row, |
| var | col ) |
Returns the specified field as a decimal.
| function SQLRCursor::getFieldAsDouble | ( | var | row, |
| var | col ) |
Returns the specified field as a decimal.
| function SQLRCursor::getFieldAsDoubleIgnoringCase | ( | var | row, |
| var | col ) |
Returns the specified field as a decimal, ignoring case of "col".
| function SQLRCursor::getFieldAsInteger | ( | var | row, |
| var | col ) |
Returns the specified field as an integer.
| function SQLRCursor::getFieldAsInteger | ( | var | row, |
| var | col ) |
Returns the specified field as an integer.
| function SQLRCursor::getFieldAsIntegerIgnoringCase | ( | var | row, |
| var | col ) |
Returns the specified field as an integer, ignoring case of "col".
| function SQLRCursor::getFieldIgnoringCase | ( | var | row, |
| var | col ) |
Returns the specified field as a string, ignoring the case of "col".
| function SQLRCursor::getFieldLength | ( | var | row, |
| var | col ) |
Returns the length of the specified field.
| function SQLRCursor::getFieldLength | ( | var | row, |
| var | col ) |
Returns the length of the specified field.
| function SQLRCursor::getKeyAndIndexList | ( | var | table, |
| var | qualifier ) |
Generates a result set containing the keys and indexes of "table", which match the pattern "qualifier".
The result set will contain the following columns:
If "qualifier" is empty or NULL then a result set containing all keys and indexes of "table" will be returned.
If SQL Relay doesn't support getting a list of keys and indexes for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getLongest | ( | var | col | ) |
Returns the length of the longest field in the specified column.
| function SQLRCursor::getLongest | ( | var | col | ) |
Returns the length of the longest field in the specified column.
| function SQLRCursor::getNullsAsEmptyStrings | ( | ) |
Tells the connection to return NULL fields and output bind variables as empty strings. This is the default.
| function SQLRCursor::getNullsAsNulls | ( | ) |
Tells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings.
| function SQLRCursor::getOutputBindBlob | ( | var | variable | ) |
Get the value stored in a previously defined binary lob output bind variable.
| function SQLRCursor::getOutputBindClob | ( | var | variable | ) |
Get the value stored in a previously defined character lob output bind variable.
| function SQLRCursor::getOutputBindCursor | ( | var | variable | ) |
Get the cursor associated with a previously defined output bind variable.
| function SQLRCursor::getOutputBindDate | ( | var | variable, |
| var | year, | ||
| var | month, | ||
| var | day, | ||
| var | hour, | ||
| var | minute, | ||
| var | second, | ||
| var | microsecond, | ||
| var | tz ) |
Get the value stored in a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateDay | ( | var | variable | ) |
Get the day from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateHour | ( | var | variable | ) |
Get the hour from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateIsNegative | ( | var | variable | ) |
Get whether the value is negative from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateMicrosecond | ( | var | variable | ) |
Get the microsecond from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateMinute | ( | var | variable | ) |
Get the minute from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateMonth | ( | var | variable | ) |
Get the month from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateSecond | ( | var | variable | ) |
Get the second from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateTz | ( | var | variable | ) |
Get the time zone from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDateYear | ( | var | variable | ) |
Get the year from a previously defined date output bind variable.
| function SQLRCursor::getOutputBindDouble | ( | var | variable | ) |
Get the value stored in a previously defined decimal output bind variable.
| function SQLRCursor::getOutputBindInteger | ( | var | variable | ) |
Get the value stored in a previously defined integer output bind variable.
| function SQLRCursor::getOutputBindLength | ( | var | variable | ) |
Get the length of the value stored in a previously defined output bind variable.
| function SQLRCursor::getOutputBindString | ( | var | variable | ) |
Get the value stored in a previously defined string output bind variable.
| function SQLRCursor::getPrimaryKeysList | ( | var | table, |
| var | columns ) |
Generates a result set containing the primary keys of "table", which match the pattern "columns".
The result set will contain the following columns:
If "columns" is empty or NULL then a result set containing all primary keys of "table" will be returned.
If SQL Relay doesn't support getting a list of primary keys for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getProcedureList | ( | var | procedures | ) |
Generates a result set containing procedures that match the pattern "procedures".
The result set will contain the following columns:
If "procedures" is empty or NULL then a result set containing all procedures in the current database/schema will be returned.
If SQL Relay doesn't support getting a list of procedures for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getProcedureParameterList | ( | var | procedure, |
| var | parameters ) |
Generates a result set containing the parameters of "procedure", which match the pattern "parameters".
The result set will contain the following columns:
If "parameters" is empty or NULL then a result set containing all parameters of "procedure" will be returned.
If SQL Relay doesn't support getting a list of procedure parameters for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getResultSetBufferSize | ( | ) |
Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.
| function SQLRCursor::getResultSetId | ( | ) |
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().
| function SQLRCursor::getRow | ( | var | row | ) |
Returns a null terminated array of the values of the fields in the specified row.
| function SQLRCursor::getRowLengths | ( | var | row | ) |
Returns a null terminated array of the lengths of the fields in the specified row.
| function SQLRCursor::getSchemaList | ( | var | schemas | ) |
Generates a result set containing schemas that match the pattern "schemas".
The result set will contain the following columns:
(The column name is a bit of a misnomer, the results are schemas, not databases.)
If "schemas" is empty or NULL then a result set containing all schemas in the current database will be returned.
If SQL Relay doesn't support getting a list of schemas for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getTableList | ( | var | wild | ) |
Generates a result set containing the tables in the current database and schema that match the pattern "tables".
The result set will contain the following columns:
If "tables" is empty or NULL then a result set containing all tables in the current database/schema will be returned.
If SQL Relay doesn't support getting a list of tables for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getTableTypeList | ( | ) |
Generates a result set containing supported table types.
The result set will contain the following columns:
If SQL Relay doesn't support getting a list of table types for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::getTypeInfoList | ( | var | type | ) |
Generates a result set containing data type information for "type".
The result set will contain the following columns:
If "type" is empty or NULL then a result set containing all data types in the current databas/schema will be returned.
If SQL Relay doesn't support getting type info for the current database backend (or the database doesn't) then an empty result set will be returned.
| function SQLRCursor::inputBind | ( | var | variable, |
| var | value ) |
Defines a string input bind variable.
| function SQLRCursor::inputBind | ( | var | variable, |
| var | value ) |
Defines a integer input bind variable.
| function SQLRCursor::inputBind | ( | var | variable, |
| var | value, | ||
| var | precision, | ||
| var | scale ) |
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.)
| function SQLRCursor::inputBind | ( | var | variable, |
| var | value, | ||
| var | valuelength ) |
Defines a string input bind variable.
| function SQLRCursor::inputBind | ( | var | variable, |
| var | year, | ||
| var | month, | ||
| var | day, | ||
| var | hour, | ||
| var | minute, | ||
| var | second, | ||
| var | microsecond, | ||
| var | tz, | ||
| var | isnegative ) |
Defines a date input bind variable. "day" and "month" are 1-based.
Some databases distinguish between date, time, and datetime types. For those databases...
"tz" is the timezone abbreviation, and may be left NULL. Most databases ignore "tz".
Set "isnegative" may be set to true to represent a negative time interval. However, few databases support negative time intervals and ignore "isnegative".
| function SQLRCursor::inputBindBlob | ( | var | variable, |
| var | value, | ||
| var | size ) |
Defines a binary lob input bind variable.
| function SQLRCursor::inputBindClob | ( | var | variable, |
| var | value, | ||
| var | size ) |
Defines a character lob input bind variable.
| function SQLRCursor::inputBinds | ( | var | variables, |
| const var | values ) |
Defines an array of integer input bind variables.
| function SQLRCursor::inputBinds | ( | var | variables, |
| const var | values, | ||
| const var | precisions, | ||
| const var | scales ) |
Defines an array of decimal input bind variables.
| function SQLRCursor::inputBinds | ( | var | variables, |
| var | values ) |
Defines an array of string input bind variables.
| function SQLRCursor::lowerCaseColumnNames | ( | ) |
Columns names are converted to lower case.
| function SQLRCursor::mixedCaseColumnNames | ( | ) |
Columns names are returned in the same case as they are defined in the database. This is the default.
| function SQLRCursor::nextResultSet | ( | ) |
Returns true and acts like executeQuery() when there is another result set available from the server.
| function SQLRCursor::openCachedResultSet | ( | var | filename | ) |
Opens a cached result set. Returns true on success and false on failure.
| function SQLRCursor::prepareFileQuery | ( | var | path, |
| var | filename ) |
Prepare to execute the contents of "path"/"filename". Returns false if the // file couldn't be opened.
| function SQLRCursor::prepareQuery | ( | var | query | ) |
Prepare to execute "query".
| function SQLRCursor::prepareQuery | ( | var | query, |
| var | length ) |
Prepare to execute "query" with length "length". This method must be used if the query contains binary data.
| function SQLRCursor::resumeCachedResultSet | ( | var | id, |
| var | filename ) |
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.
| function SQLRCursor::resumeResultSet | ( | var | id | ) |
Resumes a result set previously left open using suspendSession(). Returns true on success and false on failure.
| function SQLRCursor::rowCount | ( | ) |
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).
| function SQLRCursor::sendFileQuery | ( | var | path, |
| var | filename ) |
Sends the query in file "path"/"filename" directly and gets a result set.
| function SQLRCursor::sendQuery | ( | var | query | ) |
Sends "query" directly and gets a result set.
| function SQLRCursor::sendQuery | ( | var | query, |
| var | length ) |
Sends "query" with length "length" directly and gets a result set. This method must be used if the query contains binary data.
| function SQLRCursor::setCacheTtl | ( | var | ttl | ) |
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.
| function SQLRCursor::setResultSetBufferSize | ( | var | rows | ) |
Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.
| function SQLRCursor::substitution | ( | var | variable, |
| var | value ) |
Defines a string substitution variable.
| function SQLRCursor::substitution | ( | var | variable, |
| var | value ) |
Defines an integer substitution variable.
| function SQLRCursor::substitution | ( | var | variable, |
| var | value, | ||
| var | precision, | ||
| var | scale ) |
Defines a decimal substitution variable.
| function SQLRCursor::substitutions | ( | var | variables, |
| var | values ) |
Defines an array of string substitution variables.
| function SQLRCursor::substitutions | ( | var | variables, |
| var | values ) |
Defines an array of integer substitution variables.
| function SQLRCursor::substitutions | ( | var | variables, |
| var | values, | ||
| var | precisions, | ||
| var | scales ) |
Defines an array of decimal substitution variables.
| function SQLRCursor::suspendResultSet | ( | ) |
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().
| function SQLRCursor::totalRows | ( | ) |
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.
| function SQLRCursor::upperCaseColumnNames | ( | ) |
Columns names are converted to upper case.
| function SQLRCursor::validateBinds | ( | ) |
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.
| function SQLRCursor::validBind | ( | var | variable | ) |
Returns true if "variable" was a valid bind variable of the query.