Parameters

Returns

connect#2

: Opens a connection to a database with specified options. : Returns a URI identifying the connection that has been opened. The implementing code determines from the $connection-config either explicitly (interpreting the driver attribute) or implicitly (using the type attribute) which driver it has to load. : : @param $connection-config json object that has the host and user informations. : @option "url" URL of the server, this option must be specified and should be declared according to JDBC specification. : @option "user" username for the server, this option is optional. : @option "password" password for the server, this option is optional. : @param $options json object that specifies the connection options. : @option "autocommit" The created connection will have autocommit turned on if the value the attribute is set to "true". : @option "readonly" The created connection will be readonly if the value of the attribute is set to "true". : @option "isolation-level" The created connection will have the specified transaction isolation level, : the following string typed in-scope variables represent the different transaction isolation levels : that this attribute can be set to: : - $jsql:READ-COMMITTED : - $jsql:READ-UNCOMMITTED : - $jsql:REPEATABLE-READ : - $jsql:SERIALIZABLE : if no isolation level is provided by the user the connection will be created with the default : isolation level of the database. : : : @error SQL28000 Authentication failed. : @error SQL08001 Connection error. : @error SQL40003 Isolation level not supported. : @error SQL001 Descriptive error, see error in attached message. : : @return Return an identifier that represents the connection to the server. : : Connection options example: : { "autocommit" : false, : "readonly"? : true, : "isolation-level"? : $jdbc:READ-COMMITTED } :

Parameters

Returns

metadata#1

: Return the metadata of the result of a particular DataSet. : : @param $dataset-id The identifier to a DataSet. : : @error SQL008 DataSet doesn't exist. : @error SQL08000 Connection is closed. : @error SQL001 Descriptive error, see error in attached message. : : @return This function returns the metadata associated with an executed DataSet. More in detail, it returns information about column names, types, and whether a column can contain a null value. : The metadata information can only be returned for DataSets that have been executed explicitly using the jsql:execute function. : : The metadata node returned by this function is defined as follows: : { : "columns": [ { : "name": xs:string, : "type": xs:string, : "autoincrement"? = xs:boolean, : "nillable"? = xs:boolean } * ] : } : @option "name" The name of the column. : @option "type" The SQL type of the column. : @option "autoincrement" is true if this column is automatically maintained. : @option "nillable" If the colums can contain NULL values this attribute will be set to true. : : If the query is an updating query, then the result object will return the number of affected rows like: : { "affectedrows": xs:integer }

Parameters

Returns

result-set#1

: This function returns a sequence of objects representing the rows of data from a non-updating query. : : @param $dataset-id The identifier to a DataSet. : : @error SQL008 DataSet doesn't exist. : @error SQL08000 Connection is closed. : @error SQL001 Descriptive error, see error in attached message. : : @return Return an object with the result data rows from the DataSet provided, : the data rows are defined as follows: : { column:value* }* : Every row is represented by an object of column-value representation of the returned SQL result.

Returns

set-value#3

: Set the value of the designated parameter with the given value, : this function will assign any value you send : and it will try to cast to the correct type. : : @param $prepared-statement The identifier to a prepared statement. : @param $parameter-index The index from the parameter to be set. : @param $value The value to be set. : : @error SQL003 Prepared statement doesn't exist. : @error SQL007 Parameter casting error. : @error SQL08000 Connection is closed. : @error SQL001 Descriptive error, see error in attached message. : : @return This function returns an empty-sequence()

Parameters

prepared-statement as xs:anyURI

parameter-index as xs:decimal

value as xs:anyAtomicType

Returns

empty-sequence()

tables#1

: : Return the list of tables from a connection : : @param $connection-id The identifier to a connection. : : @error SQL08000 Connection is closed. : @error SQL001 Descriptive error, see error in attached message. : : @return Return an object with the result data rows from the query provided, : the data rows are defined as follows: : { column:value* }* : Every row is represented by an object of column-value representation of the returned SQL result.

Parameters

connection-id as xs:anyURI

Returns

object()*

tables#4

: Return the list of tables from a connection : : @param $connection-id The identifier to a connection. : @param $catalog A filter of the catalog name of the tables. : Send empty-sequence for all tables. : @param $schema A filter of the schema name of the tables. : Send empty-sequence for all tables. : @param $table A filter of the name of the tables. : Send empty-sequence for all tables. : : @error SQL08000 Connection is closed. : @error SQL001 Descriptive error, see error in attached message. : : @return Return an object with the result data rows from the query provided, : the data rows are defined as follows: : { column:value* }* : Every row is represented by an object of column-value representation of the returned SQL result. :

Parameters

connection-id as xs:anyURI

catalog as xs:string

schema as xs:string

table as xs:string

Returns

object()*

Variables

$jdbc:NOT-SUPPORTED as item()*

: This variable represents the NOT-SUPPORTED level for Isolation Levels in $options for 2.2 connect function.

$jdbc:READ-COMMITTED as item()*

: This variable represents the READ-COMMITTED level for Isolation Levels in $options for 2.2 connect function.

$jdbc:READ-UNCOMMITTED as item()*

: This variable represents the READ-UNCOMMITTED level for Isolation Levels in $options for 2.2 connect function.

$jdbc:REPEATABLE-READ as item()*

: This variable represents the REPEATABLE-READ level for Isolation Levels in $options for 2.2 connect function.

$jdbc:SERIALIZABLE as item()*

: This variable represents the SERIALIZABLE level for Isolation Levels in $options for 2.2 connect function.