Add db support for PostgreSQL and Oracle.
This commit is contained in:
parent
1b58896a2e
commit
e051184c12
5 changed files with 49 additions and 2 deletions
|
@ -5,4 +5,6 @@ test.appdir = apps/test/code
|
|||
test.repository.0 = apps/test/code
|
||||
test.repository.1 = modules/jala/util/Test/code
|
||||
|
||||
And you need to have a MySQL JDBC driver in lib/ext, as well as create the database schema provided in db.sql.
|
||||
And you need to have a JDBC driver for your database in lib/ext,
|
||||
as well as create the database schema provided in one of the
|
||||
db-<product>.sql files.
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
|
||||
#MySQL
|
||||
dbcTest.url = jdbc:mysql://localhost/helmaTest
|
||||
dbcTest.driver = org.gjt.mm.mysql.Driver
|
||||
dbcTest.driver = com.mysql.jdbc.Driver
|
||||
dbcTest.user = helma
|
||||
dbcTest.password = secret
|
||||
|
||||
# Oracle
|
||||
# dbcTest.url = jdbc:oracle:thin:@localhost:1521:XE
|
||||
# dbcTest.driver = oracle.jdbc.driver.OracleDriver
|
||||
|
||||
# PostgreSQL
|
||||
# dbcTest.url = jdbc:postgresql:helmaTest
|
||||
# dbcTest.driver = org.postgresql.Driver
|
||||
|
||||
|
|
15
test/db-oracle.sql
Normal file
15
test/db-oracle.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
CREATE TABLE tb_person (
|
||||
person_id NUMBER(10) NOT NULL,
|
||||
person_name VARCHAR2(255),
|
||||
person_height NUMBER(10),
|
||||
person_dateofbirth DATE,
|
||||
person_org_id NUMBER(10),
|
||||
PRIMARY KEY (person_id)
|
||||
);
|
||||
|
||||
CREATE TABLE tb_organisation (
|
||||
org_id NUMBER(10) NOT NULL,
|
||||
org_name VARCHAR2(255),
|
||||
org_country VARCHAR2(255),
|
||||
PRIMARY KEY (org_id)
|
||||
);
|
20
test/db-postgresql.sql
Normal file
20
test/db-postgresql.sql
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
CREATE TABLE tb_person (
|
||||
person_id INTEGER NOT NULL,
|
||||
person_name VARCHAR(100),
|
||||
person_height INTEGER,
|
||||
person_dateofbirth TIMESTAMP,
|
||||
person_org_id INTEGER,
|
||||
PRIMARY KEY (person_id)
|
||||
);
|
||||
|
||||
CREATE TABLE tb_organisation (
|
||||
org_id INTEGER NOT NULL,
|
||||
org_name VARCHAR(100),
|
||||
org_country VARCHAR(100),
|
||||
PRIMARY KEY (org_id)
|
||||
);
|
||||
|
||||
CREATE USER helma WITH PASSWORD 'secret';
|
||||
GRANT insert, delete, select, update ON tb_person, tb_organisation TO helma;
|
||||
|
Loading…
Add table
Reference in a new issue