A module for performing SQL queries against Databases, returning XML representations of the result sets.
sql:close-connection($connection-handle as xs:long) as xs:boolean
Closes a connection to a SQL Database, or if the connection was taken from a connection pool then it is returned to the pool
$connection-handle | an xs:long representing the connection handle |
sql:execute($connection-handle as xs:long, $sql-statement as xs:string, $make-node-from-column-name as xs:boolean) as element()?
Executes a prepared SQL statement against a SQL db.
$connection-handle | The connection handle |
$sql-statement | The SQL statement |
$make-node-from-column-name | The flag that indicates whether the xml nodes should be formed from the column names (in this mode a space in a Column Name will be replaced by an underscore!) |
sql:execute($connection-handle as xs:long, $statement-handle as xs:long, $parameters as element()?, $make-node-from-column-name as xs:boolean) as element()?
Executes a prepared SQL statement against a SQL db.
$connection-handle | The connection handle |
$statement-handle | The prepared statement handle |
$parameters? | Parameters for the prepared statement. e.g. <sql:parameters><sql:param sql:type="long">1234</sql:param><sql:param sql:type="varchar"><sql:null/></sql:param></sql:parameters> |
$make-node-from-column-name | The flag that indicates whether the xml nodes should be formed from the column names (in this mode a space in a Column Name will be replaced by an underscore!) |
sql:get-connection($driver-classname as xs:string, $url as xs:string) as xs:long?
Opens a connection to a SQL Database
$driver-classname | The JDBC driver classname |
$url | The JDBC connection URL |
sql:get-connection($driver-classname as xs:string, $url as xs:string, $properties as element()?) as xs:long?
Opens a connection to a SQL Database
$driver-classname | The JDBC driver classname |
$url | The JDBC connection URL |
$properties? | The JDBC database connection properties in the form <properties><property name="" value=""/></properties>. |
sql:get-connection($driver-classname as xs:string, $url as xs:string, $username as xs:string, $password as xs:string) as xs:long?
Opens a connection to a SQL Database
$driver-classname | The JDBC driver classname |
$url | The JDBC connection URL |
$username | The SQL database username |
$password | The SQL database password |
sql:get-connection-from-pool($pool-name as xs:string) as xs:long?
Retrieves a connection to a SQL Database from a connection pool
$pool-name | The connection pool name (as configured in conf.xml) |
sql:get-connection-from-pool($pool-name as xs:string, $username as xs:string, $password as xs:string) as xs:long?
Retrieves a connection to a SQL Database from a connection pool
$pool-name | The connection pool name (as configured in conf.xml) |
$username | The SQL database username |
$password | The SQL database password |
sql:get-jndi-connection($jndi-name as xs:string) as xs:long?
Opens a connection to a SQL Database.
$jndi-name | The JNDI name |
sql:get-jndi-connection($jndi-name as xs:string, $username as xs:string, $password as xs:string) as xs:long?
Opens a connection to a SQL Database.
$jndi-name | The JNDI name |
$username | The username |
$password | The password |
sql:prepare($handle as xs:long, $sql-statement as xs:string) as xs:long?
Prepares a SQL statement against a SQL db using the connection indicated by the connection handle.
$handle | The connection handle |
$sql-statement | The SQL statement |