feat: add OceanBase support (#180)

* Add Oceanbase support

* Modify screenshot

* Modify the README document
This commit is contained in:
Liam
2025-06-17 11:19:08 +08:00
committed by GitHub
parent efb2333d33
commit 610980d70c
9 changed files with 13 additions and 0 deletions

View File

@ -33,6 +33,7 @@ SQL Chat esta construido en [Next.js](https://nextjs.org/), admite las siguiente
- PostgreSQL
- MSSQL
- TiDB Cloud
- OceanBase
## Privacidad de la Data

View File

@ -33,6 +33,7 @@ SQL Chat is built by [Next.js](https://nextjs.org/), it supports the following d
- PostgreSQL
- MSSQL
- TiDB Cloud
- OceanBase
## [sqlchat.ai](https://sqlchat.ai)

View File

@ -30,6 +30,7 @@ SQL Chat 是由 [Next.js](https://nextjs.org/) 构建的,它支持以下数据
- PostgreSQL
- MSSQL
- TiDB Cloud
- OceanBase
## [sqlchat.ai](https://sqlchat.ai)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 133 KiB

BIN
public/db-oceanbase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -59,6 +59,11 @@ const engines = [
name: "TiDB Serverless",
defaultPort: "4000",
},
{
type: Engine.OceanBase,
name: "OceanBase",
defaultPort: "2881",
},
// {
// type: Engine.Snowflake,
// name: "Snowflake",

View File

@ -17,6 +17,8 @@ const EngineIcon = (props: Props) => {
return <img src="/db-sqlserver.png" className={className} alt="sqlserver" />;
} else if (engine === Engine.TiDB) {
return <img src="/db-tidb.png" className={className} alt="tidb" />;
} else if (engine === Engine.OceanBase) {
return <img src="/db-oceanbase.png" className={className} alt="oceanbase" />;
} else {
return <Icon.DiDatabase className={className} />;
}

View File

@ -18,6 +18,8 @@ export const newConnector = (connection: Connection): Connector => {
return postgres(connection);
case Engine.MSSQL:
return mssql(connection);
case Engine.OceanBase:
return mysql(connection);
default:
throw new Error("Unsupported engine type.");
}

View File

@ -7,6 +7,7 @@ export enum Engine {
TiDB = "TiDB",
Snowflake = "SNOWFLAKE",
Hive = "HIVE",
OceanBase = "OCEANBASE"
}
export interface SSLOptions {