Skip to content

Commit 584e900

Browse files
committed
Initial change from template to use ojdbc8 instead of mysql
1 parent bacf388 commit 584e900

File tree

4 files changed

+33
-34
lines changed

4 files changed

+33
-34
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# MySQL JDBC Driver for eXist-db
1+
# Oracle JDBC 10 Driver for eXist-db
22

3-
Loadable JDBC Driver for MySQL within eXist-db.
3+
Loadable JDBC Driver for Oracle within eXist-db.
44

55
The version number of this package mirrors the version number
66
of the actual JDBC jar file and is updated through the dependabot

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
</parent>
1313

1414
<groupId>org.exist-db</groupId>
15-
<artifactId>exist-mysql-jdbc-driver</artifactId>
16-
<version>8.0.29</version>
15+
<artifactId>exist-ojdbc10-jdbc-driver</artifactId>
16+
<version>19.14.0.0</version>
1717

18-
<name>MySQL JDBC Driver</name>
19-
<description>MySQL JDBC Driver for eXist-db</description>
20-
<url>https://exist-db.org/exist-db/jdbc/mysql</url>
18+
<name>Oracle JDBC 10 Driver</name>
19+
<description>Oracle JDBC 10 Driver for eXist-db</description>
20+
<url>https://exist-db.org/exist-db/jdbc/ojdbc10</url>
2121

2222
<organization>
2323
<name>eXist-db</name>
@@ -62,8 +62,8 @@
6262
</dependency>
6363
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
6464
<dependency>
65-
<groupId>mysql</groupId>
66-
<artifactId>mysql-connector-java</artifactId>
65+
<groupId>com.oracle.database.jdbc</groupId>
66+
<artifactId>ojdbc10</artifactId>
6767
<version>${project.version}</version>
6868
</dependency>
6969

src/main/xquery/mysql-module.xqm renamed to src/main/xquery/ojdbc10-module.xqm

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
11
xquery version "3.1";
22

33
(:~
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.
55
:)
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";
77
import module namespace sql="http://exist-db.org/xquery/sql";
88

9-
declare variable $mysql:classpath := "com.mysql.cj.jdbc.Driver";
9+
declare variable $ojdbc10:classpath := "oracle.jdbc.OracleDriver";
1010

1111
(:~
12-
: Opens a connection to a MySQL Database
12+
: Opens a connection to a ojdbc10 Database
1313
: @param $url The JDBC connection URL
1414
: @return an xs:long representing the connection handle
1515
:)
16-
declare function mysql:get-connection($url as xs:string)
16+
declare function ojdbc10:get-connection($url as xs:string)
1717
as xs:long?
1818
{
19-
sql:get-connection($mysql:classpath, $url)
19+
sql:get-connection($ojdbc10:classpath, $url)
2020
};
2121

2222
(:~
23-
: Opens a connection to a MySQL Database
23+
: Opens a connection to a ojdbc10 Database
2424
: @param $url The JDBC connection URL
2525
: @param $properties The JDBC database connection properties in the form &lt;properties&gt;&lt;property name="" value=""/&gt;&lt;/properties&gt;
2626
: @return an xs:long representing the connection handle
2727
:)
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()?)
2929
as xs:long?
3030
{
31-
sql:get-connection($mysql:classpath, $url, $properties)
31+
sql:get-connection($ojdbc10:classpath, $url, $properties)
3232
};
3333

3434
(:~
35-
: Opens a connection to a MySQL Database
35+
: Opens a connection to a ojdbc10 Database
3636
: @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
3939
: @return an xs:long representing the connection handle
4040
:)
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)
4242
as xs:long?
4343
{
44-
sql:get-connection($mysql:classpath, $url, $username, $password)
44+
sql:get-connection($ojdbc10:classpath, $url, $username, $password)
4545
};
4646

4747
(:~
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.
4949
: @param $handle The connection handle
5050
: @param $sql-statement The SQL statement
5151
: @return an xs:long representing the statement handle
5252
:)
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)
5454
as xs:long?
5555
{
5656
sql:prepare($handle, $sql-statement)
5757
};
5858

5959
(:~
60-
: Executes a SQL statement against a MySQL database.
60+
: Executes a SQL statement against a ojdbc10 database.
6161
: @param $connection-handle The connection handle
6262
: @param $sql-statement The SQL statement
6363
: @param $make-node-from-column-name
@@ -66,7 +66,7 @@ as xs:long?
6666
: will be replaced by an underscore!)
6767
: @return the results
6868
:)
69-
declare function mysql:execute(
69+
declare function ojdbc10:execute(
7070
$connection-handle as xs:long,
7171
$sql-statement as xs:string,
7272
$make-node-from-column-name as xs:boolean
@@ -77,7 +77,7 @@ as element()?
7777
};
7878

7979
(:~
80-
: Executes a prepared SQL statement against a MySQL database.
80+
: Executes a prepared SQL statement against a ojdbc10 database.
8181
: @param $connection-handle The connection handle
8282
: @param $statement-handle The prepared statement handle
8383
: @param $parameters Parameters for the prepared statement.
@@ -94,7 +94,7 @@ as element()?
9494
: will be replaced by an underscore!)
9595
: @return the results
9696
:)
97-
declare function mysql:execute(
97+
declare function ojdbc10:execute(
9898
$connection-handle as xs:long,
9999
$statement-handle as xs:long,
100100
$parameters as element()?,

xar-assembly.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<!-- include the XQuery Library modules written in XQuery from this project -->
4242
<xquerySets>
4343
<xquerySet>
44-
<namespace>https://exist-db.org/exist-db/ns/app/mysql</namespace>
44+
<namespace>https://exist-db.org/exist-db/ns/app/ojdbc10</namespace>
4545
<directory>${basedir}/src/main/xquery</directory>
4646
<includes>
47-
<include>mysql-module.xqm</include>
47+
<include>ojdbc10-module.xqm</include>
4848
</includes>
4949
<outputDirectory>content</outputDirectory>
5050
</xquerySet>
@@ -57,10 +57,9 @@
5757
<artifactId>${project.artifactId}</artifactId>
5858
<version>${project.version}</version>
5959
</dependencySet>
60-
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
6160
<dependencySet>
62-
<groupId>mysql</groupId>
63-
<artifactId>mysql-connector-java</artifactId>
61+
<groupId>com.oracle.database.jdbc</groupId>
62+
<artifactId>ojdbc10</artifactId>
6463
<version>${project.version}</version>
6564
</dependencySet>
6665
</dependencySets>

0 commit comments

Comments
 (0)