Class | SQLRCursor |
In: |
sqlrelay.cpp
|
Parent: | Object |
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. -1 is returned by databases which don‘t support this option.
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.
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.
Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.
Tells the server not to send any column info (names, types, sizes). If you don‘t need that info, you should call this function to improve performance.
Returns 0 if part of the result set is still pending on the server and 1 if not. This function can only return 0 if setResultSetBufferSize() has been called with a parameter other than 0.
If a query failed and generated an error, the error message is available here. If the query succeeded then this function returns a nil.
If a query failed and generated an error, the error number is available here. If there is no error then this method returns 0.
Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.
Returns 1 if the specified column auto-increments and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column contains binary data and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column can contain nulls and 0 otherwise. "col" may be specified as the colum name or number.
Returns 1 if the specified column is part of a composite key and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column is a primary key and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column is unique and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column is an unsigned number and 0 otherwise. "col" may be specified as the column name or number.
Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise. "col" may be specified as the column name or number.
Sends a query that returns a list of columns in the table specified by the "table" parameter matching "wild". If wild is empty or nil then a list of all columns will be returned.
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. "col" may be specified as the column name or number.
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. "col" may be specified as the column name or number.
Sends a query that returns a list of databases/schemas matching "wild". If wild is empty or nil then a list of all databases/schemas will be returned.
Returns the length of the specified row and column. "col" may be specified as the column name or number.
Returns the length of the longest field in the specified column. "col" may be specified as the column name or number.
Tells the connection to return NULL fields and output bind variables as empty strings. This is the default.
Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.
Returns the internal ID of this result set. This parameter may be passed to another statement for use in the resumeResultSet() function. Note: The value this function returns is only valid after a call to suspendResultSet().
Sends a query that returns a list of tables matching "wild". If wild is empty or nil then a list of all tables will be returned.
Defines am input bind variable. The value may be a string, integer or decimal. If it is a decimal then the precision and scale may be specified. If you don‘t have the precision and scale then set them both to 0. However in that case you may get unexpected rounding behavior if the server is faking binds.
Defines an array of input bind variables. The values may be strings, integers or decimals. If they are decimals then the precisions and scales may also be specified.
Columns names are returned in the same case as they are defined in the database. This is the default.
Prepare to execute "query" with length "length". This function must be used if the query contains binary data.
Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename". Returns 1 on success and 0 on failure.
Resumes a result set previously left open using suspendSession(). Returns 1 on success and 0 on failure.
Sends "query" with length "length" directly and gets a result set. This function must be used if the query contains binary data.
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.
Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.
Defines a substitution variable. The value may be a string, integer or decimal. If it is a decimal then the precision and scale may be specified.
Defines an array of substitution variables. The values may be strings, integers or decimals. If they are decimals then the precisions and scales may also be specified.
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().
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. -1 is returned by databases which don‘t support this option.