Changes

Jump to navigation Jump to search
33 bytes removed ,  17:45, 24 March 2015
no edit summary
This [[Module Library|XQuery Module]] contains functions to access relational databases from XQuery using SQL. With this module, you can execute query, update and prepared statements, and the result sets are returned as sequences of XML elements representing tuples. Each element has children representing the columns returned by the SQL statement.
 
This module uses JDBC to connect to a SQL server. Hence, your JDBC driver will need to be added to the classpath, too. If you work with the full distributions of BaseX, you can copy the driver into the {{Code|lib}} directory. To connect to MySQL, for example, download the [https://dev.mysql.com/downloads/connector/j/ Connector/J Driver] and extract the archive into this directory.
=Conventions=
All functions in this module are assigned to the {{Code|http://basex.org/modules/sql}} namespace, which is statically bound to the {{Code|sql}} prefix.<br/>
All errors are assigned to the {{Code|http://basex.org/errors}} namespace, which is statically bound to the {{Code|bxerr}} prefix.<br/>This module uses JDBC to connect to a SQL server. Hence, you have to put the JDBC driver so that it is loaded into Basex. Most likely you want to put the connector into the {{Code|lib/}} folder, where it will be automatically included. So to connect to MySQL, download the [https://dev.mysql.com/downloads/connector/j/ Connector/J driver from their website] and extract the archive into the {{Code|lib/}} folder.
=Functions=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu