Package com.firstworks.sqlrelay
Class SQLRCursor
java.lang.Object
com.firstworks.sqlrelay.SQLRCursor
-
Field Summary
FieldsModifier and TypeFieldDescriptionlongcursor and connection are used internally, they're just public to make the JNI wrapper work faster. -
Constructor Summary
ConstructorsConstructorDescriptionSQLRCursor(SQLRConnection con) Creates a cursor to run queries and fetch result sets using connecton "sqlrc". -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the number of rows that were updated, inserted or deleted by the query.voidcacheOff()Sets query caching off.voidcacheToFile(String filename) Sets query caching on.voidClears all bind variables.voidCloses the current result set, if one is open.intcolCount()Returns the number of columns in the current result set.shortParses the previously prepared query, counts the number of bind variables defined in it and returns that number.voiddefineOutputBindBlob(String variable) Defines a binary lob output bind variable.voiddefineOutputBindClob(String variable) Defines a character lob output bind variable.voiddefineOutputBindCursor(String variable) Defines a cursor output bind variable.voiddefineOutputBindDate(String variable) Defines a date output bind variable.voiddefineOutputBindDouble(String variable) Defines a decimal output bind variable.voiddefineOutputBindInteger(String variable) Defines an integer output bind variable.voiddefineOutputBindString(String variable, int bufferlength) Defines an output bind variable.voiddelete()Destroys the cursor and cleans up all associated result set data.voidTells the server not to send any column info (names, types, sizes).booleanReturns false if part of the result set is still pending on the server and true if not.If a query failed and generated an error, the error message is available here.longIf a query failed and generated an error, the error number is available here.booleanExecute the query that was previously prepared and bound.booleanFetch from a cursor that was returned as an output bind variable.longReturns the index of the first buffered row.Returns the name of the file containing the cached result set.booleangetCatalogList(String catalogs) Generates a result set containing catalogs that match the pattern "catalog".booleangetCatalogListWithFormat(String catalogs, int listformat) voidTells the server to send column info.booleangetColumnIsAutoIncrement(int col) Returns true if the specified column auto-increments and false otherwise.booleanReturns true if the specified column auto-increments and false otherwise.booleangetColumnIsBinary(int col) Returns true if the specified column contains binary data and false otherwise.booleangetColumnIsBinary(String col) Returns true if the specified column contains binary data and false otherwise.booleangetColumnIsNullable(int col) Returns true if the specified column can contain nulls and false otherwise.booleanReturns true if the specified column can contain nulls and false otherwise.booleangetColumnIsPartOfKey(int col) Returns true if the specified column is part of a composite key and false otherwise.booleanReturns true if the specified column is part of a composite key and false otherwise.booleangetColumnIsPrimaryKey(int col) Returns true if the specified column is a primary key and false otherwise.booleanReturns true if the specified column is a primary key and false otherwise.booleangetColumnIsUnique(int col) Returns true if the specified column is unique and false otherwise.booleangetColumnIsUnique(String col) Returns true if the specified column is unique and false otherwise.booleangetColumnIsUnsigned(int col) Returns true if the specified column is an unsigned number and false otherwise.booleanReturns true if the specified column is an unsigned number and false otherwise.booleangetColumnIsZeroFilled(int col) Returns true if the specified column was created with the zero-fill flag and false otherwise.booleanReturns true if the specified column was created with the zero-fill flag and false otherwise.intgetColumnLength(int col) Returns the number of bytes required on the server to store the data for the specified columnintgetColumnLength(String col) Returns the number of bytes required on the server to store the data for the specified columnbooleangetColumnList(String table, String columns) Generates a result set containing the columns of "table", which match the pattern "columns".booleangetColumnListWithFormat(String table, String columns, int listformat) getColumnName(int col) Returns the name of the specified column.String[]Returns a null terminated array of the column names of the current result set.longgetColumnPrecision(int col) Returns the precision of the specified column.longgetColumnPrecision(String col) Returns the precision of the specified column.longgetColumnScale(int col) Returns the scale of the specified column.longgetColumnScale(String col) Returns the scale of the specified column.getColumnType(int col) Returns the type of the specified column.getColumnType(String col) Returns the type of the specified column.booleangetDatabaseList(String databases) Generates a result set containing databases that match the pattern "databases".booleangetDatabaseListWithFormat(String databases, int listformat) getField(long row, int col) Returns the specified field as a string.Returns the specified field as a string.booleangetFieldAsBoolean(long row, int col) Returns the specified field as a boolean.booleangetFieldAsBoolean(long row, String col) Returns the specified field as a boolean.booleangetFieldAsBooleanIgnoringCase(long row, String col) Returns the specified field as a boolean, ignoring the case of "col".byte[]getFieldAsByteArray(long row, int col) Returns the specified field as a byte array.byte[]getFieldAsByteArray(long row, String col) Returns the specified field as a byte array.shortgetFieldAsDateDay(long row, int col) Interprets the specified field as a date and returns the day component.shortgetFieldAsDateDay(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component.shortgetFieldAsDateDay(long row, String col) Interprets the specified field as a date and returns the day component.shortgetFieldAsDateDay(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component.shortgetFieldAsDateDayIgnoringCase(long row, String col) Interprets the specified field as a date and returns the day component, ignoring the case of "col".shortgetFieldAsDateDayIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component, ignoring the case of "col".shortgetFieldAsDateHour(long row, int col) Interprets the specified field as a date and returns the hour component.shortgetFieldAsDateHour(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component.shortgetFieldAsDateHour(long row, String col) Interprets the specified field as a date and returns the hour component.shortgetFieldAsDateHour(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component.shortgetFieldAsDateHourIgnoringCase(long row, String col) Interprets the specified field as a date and returns the hour component, ignoring the case of "col".shortgetFieldAsDateHourIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component, ignoring the case of "col".booleangetFieldAsDateIsNegative(long row, int col) Interprets the specified field as a date and returns whether the hour component is negative.booleangetFieldAsDateIsNegative(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative.booleangetFieldAsDateIsNegative(long row, String col) Interprets the specified field as a date and returns whether the hour component is negative.booleangetFieldAsDateIsNegative(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative.booleangetFieldAsDateIsNegativeIgnoringCase(long row, String col) Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col".booleangetFieldAsDateIsNegativeIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col".intgetFieldAsDateMicrosecond(long row, int col) Interprets the specified field as a date and returns the microsecond component.intgetFieldAsDateMicrosecond(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component.intgetFieldAsDateMicrosecond(long row, String col) Interprets the specified field as a date and returns the microsecond component.intgetFieldAsDateMicrosecond(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component.intgetFieldAsDateMicrosecondIgnoringCase(long row, String col) Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col".intgetFieldAsDateMicrosecondIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col".shortgetFieldAsDateMinute(long row, int col) Interprets the specified field as a date and returns the minute component.shortgetFieldAsDateMinute(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component.shortgetFieldAsDateMinute(long row, String col) Interprets the specified field as a date and returns the minute component.shortgetFieldAsDateMinute(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component.shortgetFieldAsDateMinuteIgnoringCase(long row, String col) Interprets the specified field as a date and returns the minute component, ignoring the case of "col".shortgetFieldAsDateMinuteIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component, ignoring the case of "col".shortgetFieldAsDateMonth(long row, int col) Interprets the specified field as a date and returns the month component.shortgetFieldAsDateMonth(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component.shortgetFieldAsDateMonth(long row, String col) Interprets the specified field as a date and returns the month component.shortgetFieldAsDateMonth(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component.shortgetFieldAsDateMonthIgnoringCase(long row, String col) Interprets the specified field as a date and returns the month component, ignoring the case of "col".shortgetFieldAsDateMonthIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component, ignoring the case of "col".shortgetFieldAsDateSecond(long row, int col) Interprets the specified field as a date and returns the second component.shortgetFieldAsDateSecond(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component.shortgetFieldAsDateSecond(long row, String col) Interprets the specified field as a date and returns the second component.shortgetFieldAsDateSecond(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component.shortgetFieldAsDateSecondIgnoringCase(long row, String col) Interprets the specified field as a date and returns the second component, ignoring the case of "col".shortgetFieldAsDateSecondIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component, ignoring the case of "col".shortgetFieldAsDateYear(long row, int col) Interprets the specified field as a date and returns the year component.shortgetFieldAsDateYear(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component.shortgetFieldAsDateYear(long row, String col) Interprets the specified field as a date and returns the year component.shortgetFieldAsDateYear(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component.shortgetFieldAsDateYearIgnoringCase(long row, String col) Interprets the specified field as a date and returns the year component, ignoring the case of "col".shortgetFieldAsDateYearIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component, ignoring the case of "col".doublegetFieldAsDouble(long row, int col) Returns the specified field as a decimal.doublegetFieldAsDouble(long row, String col) Returns the specified field as a decimal.doublegetFieldAsDoubleIgnoringCase(long row, String col) Returns the specified field as a decimal, ignoring the case of "col".longgetFieldAsInteger(long row, int col) Returns the specified field as an integer.longgetFieldAsInteger(long row, String col) Returns the specified field as an integer.longgetFieldAsIntegerIgnoringCase(long row, String col) Returns the specified field as an integer, ignoring the case of "col".getFieldIgnoringCase(long row, String col) Returns the specified field as a string, ignoring the case of "col".longgetFieldLength(long row, int col) Returns the length of the specified field.longgetFieldLength(long row, String col) Returns the length of the specified field.booleangetKeyAndIndexList(String table, String qualifier) Generates a result set containing the keys and indexes of "table", which match the pattern "qualifier".booleangetKeyAndIndexListWithFormat(String table, String qualifier, int listformat) booleanintgetLongest(int col) Returns the length of the longest field in the specified column.intgetLongest(String col) Returns the length of the longest field in the specified column.voidTells the connection to return NULL fields and output bind variables as empty strings.voidTells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings.byte[]getOutputBindAsByteArray(String variable) Get the length of the value stored in a previously defined output bind variable.byte[]getOutputBindBlob(String variable) Get the value stored in a previously defined binary lob output bind variable.getOutputBindClob(String variable) Get the value stored in a previously defined character lob output bind variable.getOutputBindCursor(String variable) Get the cursor associated with a previously defined output bind variable.shortgetOutputBindDateDay(String variable) Get the day from a previously defined date output bind variable.shortgetOutputBindDateHour(String variable) Get the hour from a previously defined date output bind variable.booleangetOutputBindDateIsNegative(String variable) Get whether the value is negative from a previously defined date output bind variable.intgetOutputBindDateMicrosecond(String variable) Get the microsecond from a previously defined date output bind variable.shortgetOutputBindDateMinute(String variable) Get the minute from a previously defined date output bind variable.shortgetOutputBindDateMonth(String variable) Get the month from a previously defined date output bind variable.shortgetOutputBindDateSecond(String variable) Get the second from a previously defined date output bind variable.getOutputBindDateTz(String variable) Get the time zone from a previously defined date output bind variable.shortgetOutputBindDateYear(String variable) Get the year from a previously defined date output bind variable.doublegetOutputBindDouble(String variable) Get the value stored in a previously defined decimal output bind variable.longgetOutputBindInteger(String variable) Get the value stored in a previously defined integer output bind variable.longgetOutputBindLength(String variable) Get the length of the value stored in a previously defined output bind variable.getOutputBindString(String variable) Get the value stored in a previously defined string output bind variable.booleangetPrimaryKeysList(String table, String columns) Generates a result set containing the primary keys of "table", which match the pattern "columns".booleangetPrimaryKeysListWithFormat(String table, String columns, int listformat) booleangetProcedureList(String procedures) Generates a result set containing procedures that match the pattern "procedures".booleangetProcedureListWithFormat(String procedures, int listformat) booleangetProcedureParameterList(String procedure, String parameters) Generates a result set containing the parameters of "procedure", which match the pattern "parameters".booleangetProcedureParameterListWithFormat(String procedure, String parameters, int listformat) longReturns the number of result set rows that will be buffered at a time or 0 for the entire result set.shortReturns the internal ID of this result set.String[]getRow(long row) Returns a null terminated array of the values of the fields in the specified row.long[]getRowLengths(long row) Returns a null terminated array of the lengths of the fields in the specified row.booleangetSchemaList(String schemas) Generates a result set containing schemas that match the pattern "schemas".booleangetSchemaListWithFormat(String schemas, int listformat) booleangetTableList(String tables) Generates a result set containing the tables in the current database and schema that match the pattern "tables".booleangetTableListWithFormat(String tables, int listformat, int objecttypes) booleanGenerates a result set containing supported table types.booleangetTableTypeListWithFormat(int listformat) booleangetTypeInfoList(String type) Generates a result set containing data type information for "type".booleangetTypeInfoListWithFormat(String type, int listformat) voidDefines a decimal input bind variable.voidDefines a integer input bind variable.voidinputBind(String variable, short year, short month, short day, short hour, short minute, short second, int microsecond, String tz, boolean isnegative) Defines a date input bind variable.voidDefines a string input bind variable.voidDefines a string input bind variable.voidinputBindBlob(String variable, byte[] value, long size) Defines a binary lob input bind variable.voidinputBindClob(String variable, String value, long size) Defines a character lob input bind variable.voidinputBinds(String[] variables, double[] values, int[] precisions, int[] scales) Defines an array of decimal input bind variables.voidinputBinds(String[] variables, long[] values) Defines an array of integer input bind variables.voidinputBinds(String[] variables, String[] values) Defines an array of string input bind variables.booleanisBinaryType(String type) booleanisBlobType(String type) booleanisClobType(String type) booleanisDateTimeType(String type) booleanisNumberType(String type) booleanisUnsignedType(String type) voidColumns names are converted to lower case.voidColumns names are returned in the same case as they are defined in the database.booleanReturns true and acts like executeQuery() when there is another result set available from the server.booleanopenCachedResultSet(String filename) Opens a cached result set.booleanprepareFileQuery(String path, String filename) Prepare to execute the contents of "path"/"filename".voidprepareQuery(String query) Prepare to execute "query".voidprepareQuery(String query, int length) Prepare to execute "query" with length "length".booleanresumeCachedResultSet(short id, String filename) Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename".booleanresumeResultSet(short id) Resumes a result set previously left open using suspendSession().longrowCount()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).booleansendFileQuery(String path, String filename) Sends the query in file "path"/"filename" directly and gets a result set.booleanSends "query" directly and gets a result set.booleanSends "query" with length "length" directly and gets a result set.voidsetCacheTtl(int ttl) Sets the time-to-live for cached result sets.voidsetResultSetBufferSize(long rows) Sets the number of rows of the result set to buffer at a time.voidsubstitution(String variable, double value, int precision, int scale) Defines a decimal substitution variable.voidsubstitution(String variable, long value) Defines an integer substitution variable.voidsubstitution(String variable, String value) Defines a string substitution variable.voidsubstitutions(String[] variables, double[] values, int[] precisions, int[] scales) Defines an array of decimal substitution variables.voidsubstitutions(String[] variables, long[] values) Defines an array of integer substitution variables.voidsubstitutions(String[] variables, String[] values) Defines an array of string substitution variables.voidTells 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().longReturns the total number of rows that will be returned in the result set.voidColumns names are converted to upper case.voidIf 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.booleanReturns true if "variable" was a valid bind variable of the query.
-
Field Details
-
cursor
public long cursorcursor and connection are used internally, they're just public to make the JNI wrapper work faster. -
connection
-
-
Constructor Details
-
SQLRCursor
Creates a cursor to run queries and fetch result sets using connecton "sqlrc".
-
-
Method Details
-
delete
public void delete()Destroys the cursor and cleans up all associated result set data. -
setResultSetBufferSize
public void setResultSetBufferSize(long rows) Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set. -
getResultSetBufferSize
public long getResultSetBufferSize()Returns the number of result set rows that will be buffered at a time or 0 for the entire result set. -
dontGetColumnInfo
public void 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. -
getColumnInfo
public void getColumnInfo()Tells the server to send column info. -
mixedCaseColumnNames
public void mixedCaseColumnNames()Columns names are returned in the same case as they are defined in the database. This is the default. -
upperCaseColumnNames
public void upperCaseColumnNames()Columns names are converted to upper case. -
lowerCaseColumnNames
public void lowerCaseColumnNames()Columns names are converted to lower case. -
cacheToFile
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. -
setCacheTtl
public void setCacheTtl(int 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. -
getCacheFileName
Returns the name of the file containing the cached result set. -
cacheOff
public void cacheOff()Sets query caching off. -
getDatabaseList
Generates a result set containing databases that match the pattern "databases". The result set will contain the following columns:- Database
-
getCatalogList
Generates a result set containing catalogs that match the pattern "catalog". The result set will contain the following columns:- Database
-
getSchemaList
Generates a result set containing schemas that match the pattern "schemas". The result set will contain the following columns:- Database
-
getTableTypeList
public boolean getTableTypeList()Generates a result set containing supported table types. The result set will contain the following columns:- table_type
-
getTableList
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:- Tables_in_xxx
-
getTypeInfoList
Generates a result set containing data type information for "type". The result set will contain the following columns:- type_name
- data_type
- precision
- literal_prefix
- literal_suffix
- create_params
- nullable
- case_sensitive
- searchable
- unsigned_attribute
- fixed_prec_scale
- auto_increment
- local_type_name
- minumum_scale
- maxiumm_scale
- sql_data_type
- sql_datetime_sub
- num_prec_radix
- interval_precision
-
getColumnList
Generates a result set containing the columns of "table", which match the pattern "columns". The result set will contain the following columns:- column_name
- data_type
- character_maximum_length
- numeric_precision
- numeric_scale
- is_nullable
- column_key
- column_default
- extra
-
getPrimaryKeysList
Generates a result set containing the primary keys of "table", which match the pattern "columns". The result set will contain the following columns:- table
- non_unique
- key_name
- seq_in_index
- column_name
- collation
- cardinality
- sub_part
- packed
- null
- index_type
- comment
- index_comment
-
getKeyAndIndexList
Generates a result set containing the keys and indexes of "table", which match the pattern "qualifier". The result set will contain the following columns:- table
- non_unique
- key_name
- seq_in_index
- column_name
- collation
- cardinality
- sub_part
- packed
- null
- index_type
- comment
- index_comment
-
getProcedureList
Generates a result set containing procedures that match the pattern "procedures". The result set will contain the following columns:- routine_catalog
- routine_schema
- routine_name
- data_type
-
getProcedureParameterList
Generates a result set containing the parameters of "procedure", which match the pattern "parameters". The result set will contain the following columns:- parameter_name
- parameter_mode
- data_type
- character_maximum_length
- ordinal_position
-
sendQuery
Sends "query" directly and gets a result set. -
sendQuery
Sends "query" with length "length" directly and gets a result set. This method must be used if the query contains binary data. -
sendFileQuery
Sends the query in file "path"/"filename" directly and gets a result set. -
prepareQuery
Prepare to execute "query". -
prepareQuery
Prepare to execute "query" with length "length". This method must be used if the query contains binary data. -
prepareFileQuery
Prepare to execute the contents of "path"/"filename". Returns false if the file couldn't be opened. -
clearBinds
public void clearBinds()Clears all bind variables. -
substitution
Defines a string substitution variable. -
substitution
Defines an integer substitution variable. -
substitution
Defines a decimal substitution variable. -
countBindVariables
public short countBindVariables()Parses the previously prepared query, counts the number of bind variables defined in it and returns that number. -
inputBind
Defines a string input bind variable. -
inputBind
Defines a string input bind variable. -
inputBind
Defines a integer input bind variable. -
inputBind
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.) -
inputBind
public void inputBind(String variable, short year, short month, short day, short hour, short minute, short second, int microsecond, String tz, boolean 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... * The input bind variable will be interpreted as a time type if year and/or month are negative. * The input bind variable will be interpreted as a date type if hour, minute, second, and/or microsecond are negative. * The input bind variable will be interpreted as a datetime type if all parts are positive. "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". -
inputBindBlob
Defines a binary lob input bind variable. -
inputBindClob
Defines a character lob input bind variable. -
defineOutputBindString
Defines an output bind variable. "bufferlength" bytes will be reserved to store the value. -
defineOutputBindInteger
Defines an integer output bind variable. -
defineOutputBindDouble
Defines a decimal output bind variable. -
defineOutputBindBlob
Defines a binary lob output bind variable. -
defineOutputBindClob
Defines a character lob output bind variable. -
defineOutputBindCursor
Defines a cursor output bind variable. -
defineOutputBindDate
Defines a date output bind variable. -
substitutions
Defines an array of string substitution variables. -
substitutions
Defines an array of integer substitution variables. -
substitutions
Defines an array of decimal substitution variables. -
inputBinds
Defines an array of string input bind variables. -
inputBinds
Defines an array of integer input bind variables. -
inputBinds
Defines an array of decimal input bind variables. -
validateBinds
public void 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. -
validBind
Returns true if "variable" was a valid bind variable of the query. -
executeQuery
public boolean executeQuery()Execute the query that was previously prepared and bound. -
fetchFromBindCursor
public boolean fetchFromBindCursor()Fetch from a cursor that was returned as an output bind variable. -
getOutputBindString
Get the value stored in a previously defined string output bind variable. -
getOutputBindBlob
Get the value stored in a previously defined binary lob output bind variable. -
getOutputBindClob
Get the value stored in a previously defined character lob output bind variable. -
getOutputBindAsByteArray
Get the length of the value stored in a previously defined output bind variable. -
getOutputBindInteger
Get the value stored in a previously defined integer output bind variable. -
getOutputBindDouble
Get the value stored in a previously defined decimal output bind variable. -
getOutputBindLength
Get the length of the value stored in a previously defined output bind variable. -
getOutputBindDateYear
Get the year from a previously defined date output bind variable. -
getOutputBindDateMonth
Get the month from a previously defined date output bind variable. -
getOutputBindDateDay
Get the day from a previously defined date output bind variable. -
getOutputBindDateHour
Get the hour from a previously defined date output bind variable. -
getOutputBindDateMinute
Get the minute from a previously defined date output bind variable. -
getOutputBindDateSecond
Get the second from a previously defined date output bind variable. -
getOutputBindDateMicrosecond
Get the microsecond from a previously defined date output bind variable. -
getOutputBindDateTz
Get the time zone from a previously defined date output bind variable. -
getOutputBindDateIsNegative
Get whether the value is negative from a previously defined date output bind variable. -
getOutputBindCursor
Get the cursor associated with a previously defined output bind variable. -
openCachedResultSet
Opens a cached result set. Returns true on success and false on failure. -
colCount
public int colCount()Returns the number of columns in the current result set. -
rowCount
public long 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). -
totalRows
public long 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. -
affectedRows
public long 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. -
firstRowIndex
public long firstRowIndex()Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time. -
endOfResultSet
public boolean 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. -
nextResultSet
public boolean nextResultSet()Returns true and acts like executeQuery() when there is another result set available from the server. -
errorMessage
If a query failed and generated an error, the error message is available here. If the query succeeded then this method returns NULL. -
errorNumber
public long 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. -
getNullsAsEmptyStrings
public void getNullsAsEmptyStrings()Tells the connection to return NULL fields and output bind variables as empty strings. This is the default. -
getNullsAsNulls
public void getNullsAsNulls()Tells the connection to return NULL fields and output bind variables as NULL's rather than as empty strings. -
getField
Returns the specified field as a string. -
getField
Returns the specified field as a string. -
getFieldIgnoringCase
Returns the specified field as a string, ignoring the case of "col". -
getFieldAsInteger
public long getFieldAsInteger(long row, int col) Returns the specified field as an integer. -
getFieldAsInteger
Returns the specified field as an integer. -
getFieldAsIntegerIgnoringCase
Returns the specified field as an integer, ignoring the case of "col". -
getFieldAsDouble
public double getFieldAsDouble(long row, int col) Returns the specified field as a decimal. -
getFieldAsDouble
Returns the specified field as a decimal. -
getFieldAsDoubleIgnoringCase
Returns the specified field as a decimal, ignoring the case of "col". -
getFieldAsBoolean
public boolean getFieldAsBoolean(long row, int col) Returns the specified field as a boolean. -
getFieldAsBoolean
Returns the specified field as a boolean. -
getFieldAsBooleanIgnoringCase
Returns the specified field as a boolean, ignoring the case of "col". -
getFieldAsDateYear
public short getFieldAsDateYear(long row, int col) Interprets the specified field as a date and returns the year component. -
getFieldAsDateYear
public short getFieldAsDateYear(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component. -
getFieldAsDateYear
Interprets the specified field as a date and returns the year component. -
getFieldAsDateYear
public short getFieldAsDateYear(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component. -
getFieldAsDateYearIgnoringCase
Interprets the specified field as a date and returns the year component, ignoring the case of "col". -
getFieldAsDateYearIgnoringCase
public short getFieldAsDateYearIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the year component, ignoring the case of "col". -
getFieldAsDateMonth
public short getFieldAsDateMonth(long row, int col) Interprets the specified field as a date and returns the month component. -
getFieldAsDateMonth
public short getFieldAsDateMonth(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component. -
getFieldAsDateMonth
Interprets the specified field as a date and returns the month component. -
getFieldAsDateMonth
public short getFieldAsDateMonth(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component. -
getFieldAsDateMonthIgnoringCase
Interprets the specified field as a date and returns the month component, ignoring the case of "col". -
getFieldAsDateMonthIgnoringCase
public short getFieldAsDateMonthIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the month component, ignoring the case of "col". -
getFieldAsDateDay
public short getFieldAsDateDay(long row, int col) Interprets the specified field as a date and returns the day component. -
getFieldAsDateDay
public short getFieldAsDateDay(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component. -
getFieldAsDateDay
Interprets the specified field as a date and returns the day component. -
getFieldAsDateDay
public short getFieldAsDateDay(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component. -
getFieldAsDateDayIgnoringCase
Interprets the specified field as a date and returns the day component, ignoring the case of "col". -
getFieldAsDateDayIgnoringCase
public short getFieldAsDateDayIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the day component, ignoring the case of "col". -
getFieldAsDateHour
public short getFieldAsDateHour(long row, int col) Interprets the specified field as a date and returns the hour component. -
getFieldAsDateHour
public short getFieldAsDateHour(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component. -
getFieldAsDateHour
Interprets the specified field as a date and returns the hour component. -
getFieldAsDateHour
public short getFieldAsDateHour(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component. -
getFieldAsDateHourIgnoringCase
Interprets the specified field as a date and returns the hour component, ignoring the case of "col". -
getFieldAsDateHourIgnoringCase
public short getFieldAsDateHourIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the hour component, ignoring the case of "col". -
getFieldAsDateMinute
public short getFieldAsDateMinute(long row, int col) Interprets the specified field as a date and returns the minute component. -
getFieldAsDateMinute
public short getFieldAsDateMinute(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component. -
getFieldAsDateMinute
Interprets the specified field as a date and returns the minute component. -
getFieldAsDateMinute
public short getFieldAsDateMinute(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component. -
getFieldAsDateMinuteIgnoringCase
Interprets the specified field as a date and returns the minute component, ignoring the case of "col". -
getFieldAsDateMinuteIgnoringCase
public short getFieldAsDateMinuteIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the minute component, ignoring the case of "col". -
getFieldAsDateSecond
public short getFieldAsDateSecond(long row, int col) Interprets the specified field as a date and returns the second component. -
getFieldAsDateSecond
public short getFieldAsDateSecond(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component. -
getFieldAsDateSecond
Interprets the specified field as a date and returns the second component. -
getFieldAsDateSecond
public short getFieldAsDateSecond(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component. -
getFieldAsDateSecondIgnoringCase
Interprets the specified field as a date and returns the second component, ignoring the case of "col". -
getFieldAsDateSecondIgnoringCase
public short getFieldAsDateSecondIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the second component, ignoring the case of "col". -
getFieldAsDateMicrosecond
public int getFieldAsDateMicrosecond(long row, int col) Interprets the specified field as a date and returns the microsecond component. -
getFieldAsDateMicrosecond
public int getFieldAsDateMicrosecond(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component. -
getFieldAsDateMicrosecond
Interprets the specified field as a date and returns the microsecond component. -
getFieldAsDateMicrosecond
public int getFieldAsDateMicrosecond(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component. -
getFieldAsDateMicrosecondIgnoringCase
Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col". -
getFieldAsDateMicrosecondIgnoringCase
public int getFieldAsDateMicrosecondIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns the microsecond component, ignoring the case of "col". -
getFieldAsDateIsNegative
public boolean getFieldAsDateIsNegative(long row, int col) Interprets the specified field as a date and returns whether the hour component is negative. -
getFieldAsDateIsNegative
public boolean getFieldAsDateIsNegative(long row, int col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative. -
getFieldAsDateIsNegative
Interprets the specified field as a date and returns whether the hour component is negative. -
getFieldAsDateIsNegative
public boolean getFieldAsDateIsNegative(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative. -
getFieldAsDateIsNegativeIgnoringCase
Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col". -
getFieldAsDateIsNegativeIgnoringCase
public boolean getFieldAsDateIsNegativeIgnoringCase(long row, String col, boolean ddmm, boolean yyyyddmm, String datedelimiters) Interprets the specified field as a date and returns whether the hour component is negative, ignoring the case of "col". -
getFieldAsByteArray
public byte[] getFieldAsByteArray(long row, int col) Returns the specified field as a byte array. -
getFieldAsByteArray
Returns the specified field as a byte array. -
getFieldLength
public long getFieldLength(long row, int col) Returns the length of the specified field. -
getFieldLength
Returns the length of the specified field. -
getRow
Returns a null terminated array of the values of the fields in the specified row. -
getRowLengths
public long[] getRowLengths(long row) Returns a null terminated array of the lengths of the fields in the specified row. -
getColumnNames
Returns a null terminated array of the column names of the current result set. -
getColumnName
Returns the name of the specified column. -
getColumnType
Returns the type of the specified column. -
getColumnType
Returns the type of the specified column. -
getColumnPrecision
public long getColumnPrecision(int 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. -
getColumnPrecision
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. -
getColumnScale
public long getColumnScale(int 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. -
getColumnScale
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. -
getColumnIsNullable
public boolean getColumnIsNullable(int col) Returns true if the specified column can contain nulls and false otherwise. -
getColumnIsNullable
Returns true if the specified column can contain nulls and false otherwise. -
getColumnIsPrimaryKey
public boolean getColumnIsPrimaryKey(int col) Returns true if the specified column is a primary key and false otherwise. -
getColumnIsPrimaryKey
Returns true if the specified column is a primary key and false otherwise. -
getColumnIsUnique
public boolean getColumnIsUnique(int col) Returns true if the specified column is unique and false otherwise. -
getColumnIsUnique
Returns true if the specified column is unique and false otherwise. -
getColumnIsPartOfKey
public boolean getColumnIsPartOfKey(int col) Returns true if the specified column is part of a composite key and false otherwise. -
getColumnIsPartOfKey
Returns true if the specified column is part of a composite key and false otherwise. -
getColumnIsUnsigned
public boolean getColumnIsUnsigned(int col) Returns true if the specified column is an unsigned number and false otherwise. -
getColumnIsUnsigned
Returns true if the specified column is an unsigned number and false otherwise. -
getColumnIsZeroFilled
public boolean getColumnIsZeroFilled(int col) Returns true if the specified column was created with the zero-fill flag and false otherwise. -
getColumnIsZeroFilled
Returns true if the specified column was created with the zero-fill flag and false otherwise. -
getColumnIsBinary
public boolean getColumnIsBinary(int col) Returns true if the specified column contains binary data and false otherwise. -
getColumnIsBinary
Returns true if the specified column contains binary data and false otherwise. -
getColumnIsAutoIncrement
public boolean getColumnIsAutoIncrement(int col) Returns true if the specified column auto-increments and false otherwise. -
getColumnIsAutoIncrement
Returns true if the specified column auto-increments and false otherwise. -
getColumnLength
public int getColumnLength(int col) Returns the number of bytes required on the server to store the data for the specified column -
getColumnLength
Returns the number of bytes required on the server to store the data for the specified column -
getLongest
public int getLongest(int col) Returns the length of the longest field in the specified column. -
getLongest
Returns the length of the longest field in the specified column. -
suspendResultSet
public void 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(). -
getResultSetId
public short 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(). -
resumeResultSet
public boolean resumeResultSet(short id) Resumes a result set previously left open using suspendSession(). Returns true on success and false on failure. -
resumeCachedResultSet
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. -
closeResultSet
public void 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. -
getDatabaseListWithFormat
-
getCatalogListWithFormat
-
getSchemaListWithFormat
-
getTableListWithFormat
-
getTableTypeListWithFormat
public boolean getTableTypeListWithFormat(int listformat) -
getColumnListWithFormat
-
getPrimaryKeysListWithFormat
-
getKeyAndIndexListWithFormat
-
getTypeInfoListWithFormat
-
getProcedureListWithFormat
-
getProcedureParameterListWithFormat
-
getLastInsertIdList
public boolean getLastInsertIdList() -
isNumberType
-
isDateTimeType
-
isBinaryType
-
isUnsignedType
-
isClobType
-
isBlobType
-