Files
dbgate/packages/types/dialect.d.ts
2024-09-17 16:42:07 +02:00

68 lines
1.8 KiB
TypeScript

export interface SqlDialect {
rangeSelect?: boolean;
limitSelect?: boolean;
ilike?: boolean;
rowNumberOverPaging?: boolean;
topRecords?: boolean;
stringEscapeChar: string;
offsetFetchRangeSyntax?: boolean;
quoteIdentifier(s: string): string;
fallbackDataType?: string;
explicitDropConstraint?: boolean;
anonymousPrimaryKey?: boolean;
defaultSchemaName?: string;
enableConstraintsPerTable?: boolean;
requireStandaloneSelectForScopeIdentity?: boolean;
allowMultipleValuesInsert?: boolean;
dropColumnDependencies?: string[];
changeColumnDependencies?: string[];
renameColumnDependencies?: string[];
dropIndexContainsTableSpec?: boolean;
createColumn?: boolean;
dropColumn?: boolean;
changeColumn?: boolean;
createIndex?: boolean;
dropIndex?: boolean;
createForeignKey?: boolean;
dropForeignKey?: boolean;
createPrimaryKey?: boolean;
dropPrimaryKey?: boolean;
createUnique?: boolean;
dropUnique?: boolean;
createCheck?: boolean;
dropCheck?: boolean;
specificNullabilityImplementation?: boolean;
omitForeignKeys?: boolean;
omitUniqueConstraints?: boolean;
omitIndexes?: boolean;
sortingKeys?: boolean;
// syntax for create column: ALTER TABLE table ADD COLUMN column
createColumnWithColumnKeyword?: boolean;
dropReferencesWhenDropTable?: boolean;
requireFromDual?: boolean;
predefinedDataTypes: string[];
// create sql-tree expression
createColumnViewExpression(
columnName: string,
dataType: string,
source: { alias: string },
alias?: string,
purpose: 'view' | 'filter' = 'view'
): any;
getTableFormOptions(intent: 'newTableForm' | 'editTableForm' | 'sqlCreateTable' | 'sqlAlterTable'): {
name: string;
sqlFormatString: string;
disabled?: boolean;
allowEmptyValue?: boolean;
}[];
}