diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts
index 78f37aba7f..372758da9a 100644
--- a/packages/nc-gui/components.d.ts
+++ b/packages/nc-gui/components.d.ts
@@ -89,6 +89,7 @@ declare module '@vue/runtime-core' {
IcTwotoneWidthNormal: typeof import('~icons/ic/twotone-width-normal')['default']
LogosGoogleGmail: typeof import('~icons/logos/google-gmail')['default']
LogosMysqlIcon: typeof import('~icons/logos/mysql-icon')['default']
+ LogosOracle: typeof import('~icons/logos/oracle')['default']
LogosPostgresql: typeof import('~icons/logos/postgresql')['default']
LogosRedditIcon: typeof import('~icons/logos/reddit-icon')['default']
LogosSnowflakeIcon: typeof import('~icons/logos/snowflake-icon')['default']
diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue
index 2c028ad472..5d388116dd 100644
--- a/packages/nc-gui/components/dashboard/TreeView.vue
+++ b/packages/nc-gui/components/dashboard/TreeView.vue
@@ -427,6 +427,16 @@ const setIcon = async (icon: string, table: TableType) => {
Snowflake
+
+
+
@@ -547,6 +557,16 @@ const setIcon = async (icon: string, table: TableType) => {
Snowflake
+
+
+
diff --git a/packages/nc-gui/components/dashboard/settings/DataSources.vue b/packages/nc-gui/components/dashboard/settings/DataSources.vue
index 5bb4f89287..7b413a539e 100644
--- a/packages/nc-gui/components/dashboard/settings/DataSources.vue
+++ b/packages/nc-gui/components/dashboard/settings/DataSources.vue
@@ -204,6 +204,10 @@ watch(
clientType = ClientType.SNOWFLAKE
vState.value = DataSourcesSubTab.New
break
+ case ClientType.ORACLEDB:
+ clientType = ClientType.ORACLEDB
+ vState.value = DataSourcesSubTab.New
+ break
case DataSourcesSubTab.New:
if (sources.length > 1 && !forceAwakened) {
vState.value = ''
@@ -245,7 +249,7 @@ watch(
@click="baseAction(sources[0].id, DataSourcesSubTab.Metadata)"
>
-
+
Out of sync
diff --git a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
index f429dd62d3..8b9cfa22f4 100644
--- a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
+++ b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
@@ -73,7 +73,7 @@ const customFormState = ref({
const clientTypes = computed(() => {
return _clientTypes.filter((type) => {
- return appInfo.value?.ee || type.value !== ClientType.SNOWFLAKE
+ return appInfo.value?.ee || ![ClientType.SNOWFLAKE, ClientType.ORACLEDB].includes(type.value)
})
})
diff --git a/packages/nocodb/src/lib/db/sql-client/lib/SqlClientFactory.ts b/packages/nocodb/src/lib/db/sql-client/lib/SqlClientFactory.ts
index 09918843a6..e2ce638891 100644
--- a/packages/nocodb/src/lib/db/sql-client/lib/SqlClientFactory.ts
+++ b/packages/nocodb/src/lib/db/sql-client/lib/SqlClientFactory.ts
@@ -2,7 +2,6 @@ import Noco from '../../../Noco';
import SqlClientFactoryEE from './ee/SqlClientFactoryEE';
import MySqlClient from './mysql/MysqlClient';
import MssqlClient from './mssql/MssqlClient';
-import OracleClient from './oracle/OracleClient';
import SqliteClient from './sqlite/SqliteClient';
import PgClient from './pg/PgClient';
import YugabyteClient from './pg/YugabyteClient';
@@ -30,8 +29,6 @@ export class SqlClientFactory {
return new SqliteClient(connectionConfig);
} else if (connectionConfig.client === 'mssql') {
return new MssqlClient(connectionConfig);
- } else if (connectionConfig.client === 'oracledb') {
- return new OracleClient(connectionConfig);
} else if (connectionConfig.client === 'pg') {
if (connectionConfig.meta.dbtype === 'yugabyte')
return new YugabyteClient(connectionConfig);
diff --git a/packages/nocodb/src/lib/db/sql-client/lib/ee/SqlClientFactoryEE.ts b/packages/nocodb/src/lib/db/sql-client/lib/ee/SqlClientFactoryEE.ts
index 63df3a1221..3846d743db 100644
--- a/packages/nocodb/src/lib/db/sql-client/lib/ee/SqlClientFactoryEE.ts
+++ b/packages/nocodb/src/lib/db/sql-client/lib/ee/SqlClientFactoryEE.ts
@@ -1,3 +1,4 @@
+import OracleClient from '../oracle/OracleClient'
import { SqlClientFactory } from '../SqlClientFactory';
import SfClient from '../snowflake/SnowflakeClient';
import { SnowflakeClient } from 'nc-help';
@@ -11,6 +12,8 @@ class SqlClientFactoryEE {
if (connectionConfig.client === 'snowflake') {
connectionConfig.client = SnowflakeClient;
return new SfClient(connectionConfig);
+ } else if (connectionConfig.client === 'oracledb') {
+ return new OracleClient(connectionConfig);
}
return SqlClientFactory.create(connectionConfig);
}
diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts
index 5cde4edd64..2667a321f8 100644
--- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts
+++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts
@@ -2909,9 +2909,9 @@ class BaseModelSqlv2 {
? (await this.dbDriver.raw(query))?.rows
: query.slice(0, 6) === 'select' && !this.isMssql
? await this.dbDriver.from(
- this.dbDriver
- .raw(query)
- .wrap('(', this.isOracle ? ')' : ') __nc_alias')
+ this.dbDriver
+ .raw(query)
+ .wrap('(', this.isOracle ? ')' : ') __nc_alias')
)
: await this.dbDriver.raw(query),
childTable