Skip to content

Commit 8729a30

Browse files
authored
Merge pull request #785 from holistics/feat/oracle-connector
Oracle connector
2 parents 20d556a + ecea545 commit 8729a30

31 files changed

Lines changed: 5622 additions & 34 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
--health-interval 10s
4343
--health-timeout 5s
4444
--health-retries 5
45-
4645
mysql-8.0:
4746
image: mysql:8.0
4847
env:
@@ -55,8 +54,24 @@ jobs:
5554
--health-interval 10s
5655
--health-timeout 5s
5756
--health-retries 10
57+
oracle:
58+
image: gvenzl/oracle-xe:21-slim-faststart
59+
env:
60+
ORACLE_PASSWORD: root
61+
ORACLE_DATABASE: dbml_test
62+
APP_USER: dbml
63+
APP_USER_PASSWORD: root
64+
ports:
65+
- 1521:1521
66+
options: >-
67+
--health-cmd healthcheck.sh
68+
--health-interval 10s
69+
--health-timeout 5s
70+
--health-retries 10
5871
5972
steps:
73+
- name: Setup Oracle Instant Client
74+
uses: iamazeem/setup-oracle-instant-client-action@v2
6075
- uses: actions/checkout@v3
6176
- name: Import DDL to Postgres
6277
run: |
@@ -69,6 +84,9 @@ jobs:
6984
- name: Import DDL to MSSQL
7085
run: |
7186
sqlcmd -S localhost -U sa -P dbml.123.123 -d master -i packages/dbml-cli/__tests__/db2dbml/mssql/schema.sql
87+
- name: Import DDL to Oracle
88+
run: |
89+
sqlplus -s dbml/root@localhost:1521/dbml_test @packages/dbml-cli/__tests__/db2dbml/oracle/schema.sql
7290
- name: Use Node.js ${{ matrix.node-version }}
7391
uses: actions/setup-node@v3
7492
with:

dbml-homepage/docs/cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ $ db2dbml postgres 'postgresql://dbml_user:dbml_pass@localhost:5432/dbname?schem
123123
### Syntax Manual
124124
125125
```bash
126-
$ db2dbml postgres|mysql|mssql|snowflake|bigquery
126+
$ db2dbml postgres|mysql|mssql|snowflake|bigquery|oracle
127127
<connection-string>
128128
[-o|--out-file <output-filepath>]
129129
```
@@ -135,6 +135,7 @@ Connection string examples:
135135
- mssql: `'Server=localhost,1433;Database=master;User Id=sa;Password=your_password;Encrypt=true;TrustServerCertificate=true;Schemas=schema1,schema2,schema3;'`
136136
- snowflake: `'SERVER=<account_identifier>.<region>;UID=<your_username>;PWD=<your_password>;DATABASE=<your_database>;WAREHOUSE=<your_warehouse>;ROLE=<your_role>;SCHEMAS=schema1,schema2,schema3;'`
137137
- bigquery: `/path_to_json_credential.json`
138+
- oracle: `'username/password@[//]host[:port][/service_name]'`
138139
139140
For BigQuery, the credential file supports flexible authentication:
140141

dbml-homepage/docs/js-module/connector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const { connector } = require('@dbml/connector');
3636

3737
- **Arguments:**
3838
- `{string} connection`
39-
- `{'postgres'|'mssql'|'mysql'|'snowflake'|'bigquery'} databaseType`
39+
- `{'postgres'|'mssql'|'mysql'|'snowflake'|'bigquery'|'oracle'} databaseType`
4040

4141
- **Returns:**
4242
- `{DatabaseSchema} schemaJson`

0 commit comments

Comments
 (0)