mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 11:26:59 +00:00
feat: extensions (#8303)
* feat: extensions Signed-off-by: mertmit <mertmit99@gmail.com> * chore: sync Signed-off-by: mertmit <mertmit99@gmail.com> --------- Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ interface ProjectCreateForm {
|
||||
title: string
|
||||
dataSource: {
|
||||
client: ClientType
|
||||
connection: DefaultConnection | SQLiteConnection | SnowflakeConnection
|
||||
connection: DefaultConnection | SQLiteConnection | SnowflakeConnection | DatabricksConnection
|
||||
searchPath?: string[]
|
||||
}
|
||||
inflection: {
|
||||
@@ -47,6 +47,14 @@ interface SnowflakeConnection {
|
||||
schema: string
|
||||
}
|
||||
|
||||
interface DatabricksConnection {
|
||||
token: string
|
||||
host: string
|
||||
path: string
|
||||
database: string
|
||||
schema: string
|
||||
}
|
||||
|
||||
const defaultHost = 'localhost'
|
||||
|
||||
const testDataBaseNames = {
|
||||
@@ -84,12 +92,16 @@ export const clientTypes = [
|
||||
text: 'Snowflake',
|
||||
value: ClientType.SNOWFLAKE,
|
||||
},
|
||||
{
|
||||
text: 'Databricks',
|
||||
value: ClientType.DATABRICKS,
|
||||
},
|
||||
]
|
||||
|
||||
const homeDir = ''
|
||||
|
||||
type ConnectionClientType =
|
||||
| Exclude<ClientType, ClientType.SQLITE | ClientType.SNOWFLAKE>
|
||||
| Exclude<ClientType, ClientType.SQLITE | ClientType.SNOWFLAKE | ClientType.DATABRICKS>
|
||||
| 'tidb'
|
||||
| 'yugabyte'
|
||||
| 'citusdb'
|
||||
@@ -99,7 +111,7 @@ type ConnectionClientType =
|
||||
|
||||
const sampleConnectionData: { [key in ConnectionClientType]: DefaultConnection } & { [ClientType.SQLITE]: SQLiteConnection } & {
|
||||
[ClientType.SNOWFLAKE]: SnowflakeConnection
|
||||
} = {
|
||||
} & { [ClientType.DATABRICKS]: DatabricksConnection } = {
|
||||
[ClientType.PG]: {
|
||||
host: defaultHost,
|
||||
port: '5432',
|
||||
@@ -144,6 +156,13 @@ const sampleConnectionData: { [key in ConnectionClientType]: DefaultConnection }
|
||||
database: 'DATABASE',
|
||||
schema: 'PUBLIC',
|
||||
},
|
||||
[ClientType.DATABRICKS]: {
|
||||
token: 'dapiPLACEHOLDER',
|
||||
host: 'PLACEHOLDER.cloud.databricks.com',
|
||||
path: '/sql/1.0/warehouses/PLACEHOLDER',
|
||||
database: 'database',
|
||||
schema: 'default',
|
||||
},
|
||||
tidb: {
|
||||
host: defaultHost,
|
||||
port: '4000',
|
||||
@@ -215,4 +234,4 @@ enum CertTypes {
|
||||
key = 'key',
|
||||
}
|
||||
|
||||
export { SSLUsage, CertTypes, ProjectCreateForm, DefaultConnection, SQLiteConnection, SnowflakeConnection }
|
||||
export { SSLUsage, CertTypes, ProjectCreateForm, DefaultConnection, SQLiteConnection, SnowflakeConnection, DatabricksConnection }
|
||||
|
||||
Reference in New Issue
Block a user