| title |
Driver Sql |
| description |
Driver Sql protocol schemas |
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
SQL Dialect Enumeration
Supported SQL database dialects
**Source:** `packages/spec/src/data/driver-sql.zod.ts`
import { DataTypeMappingSchema, SQLDialectSchema, SQLDriverConfigSchema, SSLConfigSchema } from '@objectstack/spec/data';
import type { DataTypeMapping, SQLDialect, SQLDriverConfig, SSLConfig } from '@objectstack/spec/data';
// Validate data
const result = DataTypeMappingSchema.parse(data);
| Property |
Type |
Required |
Description |
| text |
string |
✅ |
SQL type for text fields (e.g., VARCHAR, TEXT) |
| number |
string |
✅ |
SQL type for number fields (e.g., NUMERIC, DECIMAL, INT) |
| boolean |
string |
✅ |
SQL type for boolean fields (e.g., BOOLEAN, BIT) |
| date |
string |
✅ |
SQL type for date fields (e.g., DATE) |
| datetime |
string |
✅ |
SQL type for datetime fields (e.g., TIMESTAMP, DATETIME) |
| json |
string |
optional |
SQL type for JSON fields (e.g., JSON, JSONB) |
| uuid |
string |
optional |
SQL type for UUID fields (e.g., UUID, CHAR(36)) |
| binary |
string |
optional |
SQL type for binary fields (e.g., BLOB, BYTEA) |
postgresql
mysql
sqlite
mssql
oracle
mariadb
| Property |
Type |
Required |
Description |
| name |
string |
✅ |
Driver instance name |
| type |
'sql' |
✅ |
Driver type must be "sql" |
| capabilities |
{ queryDateGranularity?: Record<string, boolean>; autonumber?: boolean; batchSchemaSync?: boolean; create?: any; … } |
✅ |
Driver capability flags |
| connectionString |
string |
optional |
Database connection string (driver-specific format) |
| poolConfig |
{ min: number; max: number; idleTimeoutMillis: number; connectionTimeoutMillis: number } |
optional |
Connection pool configuration |
| dialect |
Enum<'postgresql' | 'mysql' | 'sqlite' | 'mssql' | 'oracle' | 'mariadb'> |
✅ |
SQL database dialect |
| dataTypeMapping |
{ text: string; number: string; boolean: string; date: string; … } |
✅ |
SQL data type mapping configuration |
| ssl |
boolean |
✅ |
Enable SSL/TLS connection |
| sslConfig |
{ rejectUnauthorized: boolean; ca?: string; cert?: string; key?: string } |
optional |
SSL/TLS configuration (required when ssl is true) |
| Property |
Type |
Required |
Description |
| rejectUnauthorized |
boolean |
✅ |
Reject connections with invalid certificates |
| ca |
string |
optional |
CA certificate file path or content |
| cert |
string |
optional |
Client certificate file path or content |
| key |
string |
optional |
Client private key file path or content |