1
1
xquery version "3.1" ;
2
2
3
3
(:~
4
- : A module for performing SQL queries against MySQL Databases, returning XML representations of the result sets.
4
+ : A module for performing SQL queries against ojdbc10 Databases, returning XML representations of the result sets.
5
5
:)
6
- module namespace mysql = "https://exist-db.org/exist-db/ns/app/mysql " ;
6
+ module namespace ojdbc10 = "https://exist-db.org/exist-db/ns/app/ojdbc10 " ;
7
7
import module namespace sql="http://exist-db.org/xquery/sql" ;
8
8
9
- declare variable $mysql :classpath := "com.mysql.cj. jdbc.Driver " ;
9
+ declare variable $ojdbc10 :classpath := "oracle. jdbc.OracleDriver " ;
10
10
11
11
(:~
12
- : Opens a connection to a MySQL Database
12
+ : Opens a connection to a ojdbc10 Database
13
13
: @param $url The JDBC connection URL
14
14
: @return an xs:long representing the connection handle
15
15
:)
16
- declare function mysql :get-connection ($url as xs:string)
16
+ declare function ojdbc10 :get-connection ($url as xs:string)
17
17
as xs:long?
18
18
{
19
- sql:get-connection ($mysql :classpath, $url)
19
+ sql:get-connection ($ojdbc10 :classpath, $url)
20
20
};
21
21
22
22
(:~
23
- : Opens a connection to a MySQL Database
23
+ : Opens a connection to a ojdbc10 Database
24
24
: @param $url The JDBC connection URL
25
25
: @param $properties The JDBC database connection properties in the form <properties><property name="" value=""/></properties>
26
26
: @return an xs:long representing the connection handle
27
27
:)
28
- declare function mysql :get-connection ($url as xs:string, $properties as element ()?)
28
+ declare function ojdbc10 :get-connection ($url as xs:string, $properties as element ()?)
29
29
as xs:long?
30
30
{
31
- sql:get-connection ($mysql :classpath, $url, $properties)
31
+ sql:get-connection ($ojdbc10 :classpath, $url, $properties)
32
32
};
33
33
34
34
(:~
35
- : Opens a connection to a MySQL Database
35
+ : Opens a connection to a ojdbc10 Database
36
36
: @param $url The JDBC connection URL
37
- : @param $username The MySQL database username
38
- : @param $password The MySQL database password
37
+ : @param $username The ojdbc10 database username
38
+ : @param $password The ojdbc10 database password
39
39
: @return an xs:long representing the connection handle
40
40
:)
41
- declare function mysql :get-connection ($url as xs:string, $username as xs:string, $password as xs:string)
41
+ declare function ojdbc10 :get-connection ($url as xs:string, $username as xs:string, $password as xs:string)
42
42
as xs:long?
43
43
{
44
- sql:get-connection ($mysql :classpath, $url, $username, $password)
44
+ sql:get-connection ($ojdbc10 :classpath, $url, $username, $password)
45
45
};
46
46
47
47
(:~
48
- : Prepares a SQL statement against a MySQL db using the connection indicated by the connection handle.
48
+ : Prepares a SQL statement against a ojdbc10 db using the connection indicated by the connection handle.
49
49
: @param $handle The connection handle
50
50
: @param $sql-statement The SQL statement
51
51
: @return an xs:long representing the statement handle
52
52
:)
53
- declare function mysql :prepare ($handle as xs:long, $sql-statement as xs:string)
53
+ declare function ojdbc10 :prepare ($handle as xs:long, $sql-statement as xs:string)
54
54
as xs:long?
55
55
{
56
56
sql:prepare ($handle, $sql-statement)
57
57
};
58
58
59
59
(:~
60
- : Executes a SQL statement against a MySQL database.
60
+ : Executes a SQL statement against a ojdbc10 database.
61
61
: @param $connection-handle The connection handle
62
62
: @param $sql-statement The SQL statement
63
63
: @param $make-node-from-column-name
@@ -66,7 +66,7 @@ as xs:long?
66
66
: will be replaced by an underscore!)
67
67
: @return the results
68
68
:)
69
- declare function mysql :execute (
69
+ declare function ojdbc10 :execute (
70
70
$connection-handle as xs:long,
71
71
$sql-statement as xs:string,
72
72
$make-node-from-column-name as xs:boolean
@@ -77,7 +77,7 @@ as element()?
77
77
};
78
78
79
79
(:~
80
- : Executes a prepared SQL statement against a MySQL database.
80
+ : Executes a prepared SQL statement against a ojdbc10 database.
81
81
: @param $connection-handle The connection handle
82
82
: @param $statement-handle The prepared statement handle
83
83
: @param $parameters Parameters for the prepared statement.
@@ -94,7 +94,7 @@ as element()?
94
94
: will be replaced by an underscore!)
95
95
: @return the results
96
96
:)
97
- declare function mysql :execute (
97
+ declare function ojdbc10 :execute (
98
98
$connection-handle as xs:long,
99
99
$statement-handle as xs:long,
100
100
$parameters as element ()?,
0 commit comments