Skip to content

Commit

Permalink
feat: added support for Oracle database (#58)
Browse files Browse the repository at this point in the history
* feat: added support for Oracle database

* docs: updated roadmap
  • Loading branch information
tang2087 authored Sep 12, 2024
1 parent 35bbe3f commit 9a05537
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Kontext Copilot is still at early stage. Please follow the guide below to evalua

## Roadmap

![kontext-copilot-roadmap](https://kontext.tech/api/flex/diagram/diagram-1388)
> Refer to [https://kontext.tech/diagram/1388/kontext-copilot-roadmap](https://kontext.tech/diagram/1388/kontext-copilot-roadmap) for latest roadmap.
> ![kontext-copilot-roadmap](https://kontext.tech/api/flex/diagram/diagram-1388)
## Change logs

Expand Down
2 changes: 1 addition & 1 deletion kontext_copilot/data/models/_db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DataSourceType(str, Enum):
PostgreSQL = "PostgreSQL"
# MySQL = "MySQL"
SQLServer = "SQLServer"
# Oracle = "Oracle"
Oracle = "Oracle"
# MongoDB = "MongoDB"
# Redis = "Redis"
CSV = "CSV"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def get_data_provider(source: DataSourceModel):
DataSourceType.DuckDB,
DataSourceType.SQLServer,
DataSourceType.PostgreSQL,
DataSourceType.Oracle,
]
file_provider_types = [DataSourceType.CSV, DataSourceType.Parquet]

Expand Down
184 changes: 183 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pyarrow = "^17.0.0"
duckdb-engine = "^0.13.1"
pyodbc = "^5.1.0"
psycopg = {extras = ["binary"], version = "^3.2.1"}
oracledb = "^2.4.1"
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
Expand Down
3 changes: 3 additions & 0 deletions ui/components/data-source/create-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ watch(
dataSourceCreateModel.value.connStr = "/path/to/file.csv"
} else if (newVal == DataSourceType.Parquet) {
dataSourceCreateModel.value.connStr = "/path/to/file.parquet"
} else if (newVal == DataSourceType.Oracle) {
dataSourceCreateModel.value.connStr =
"oracle+oracledb://user:pass@hostname:port[/dbname][?service_name=<service>[&key=value&key=value...]]"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/types/Schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export enum DataSourceType {
PostgreSQL = "PostgreSQL",
// MySQL = "MySQL",
SQLServer = "SQLServer",
// Oracle = "Oracle",
Oracle = "Oracle",
// MongoDB = "MongoDB",
// Redis = "Redis",
CSV = "CSV",
Expand Down

0 comments on commit 9a05537

Please sign in to comment.