BetterSqliteSchemaHelper
Hierarchy
- SchemaHelper
- BetterSqliteSchemaHelper
Index
Constructors
Methods
- configureColumn
- configureColumnDefault
- createTableColumn
- databaseExists
- disableForeignKeysSQL
- enableForeignKeysSQL
- finalizeTable
- getAlterColumnAutoincrement
- getChangeColumnCommentSQL
- getChecks
- getColumns
- getCreateDatabaseSQL
- getCreateIndexSQL
- getDatabaseExistsSQL
- getDatabaseNotExistsError
- getDefaultEmptyString
- getDropDatabaseSQL
- getDropIndexSQL
- getEnumDefinitions
- getForeignKeys
- getForeignKeysSQL
- getIndexes
- getListTablesSQL
- getManagementDbName
- getNamespaces
- getPreAlterTable
- getPrimaryKeys
- getRenameColumnSQL
- getRenameIndexSQL
- getSchemaBeginning
- getSchemaEnd
- hasNonDefaultPrimaryKeyName
- isImplicitIndex
- loadInformationSchema
- mapForeignKeys
- normalizeDefaultValue
- pushTableQuery
- supportsSchemaConstraints
Constructors
constructor
Parameters
platform: AbstractSqlPlatform
Returns BetterSqliteSchemaHelper
Methods
configureColumn
Parameters
column: Column
col: ColumnBuilder
knex: Knex<any, any[]>
optionalchangedProperties: Set<string>
Returns ColumnBuilder
configureColumnDefault
Parameters
column: Column
col: ColumnBuilder
knex: Knex<any, any[]>
optionalchangedProperties: Set<string>
Returns ColumnBuilder
createTableColumn
Parameters
table: TableBuilder
column: Column
fromTable: DatabaseTable
optionalchangedProperties: Set<string>
Returns ColumnBuilder
databaseExists
Parameters
connection: Connection
name: string
Returns Promise<boolean>
disableForeignKeysSQL
Returns string
enableForeignKeysSQL
Returns string
finalizeTable
Parameters
table: TableBuilder
charset: string
optionalcollate: string
Returns void
getAlterColumnAutoincrement
Parameters
tableName: string
column: Column
optionalschemaName: string
Returns string
getChangeColumnCommentSQL
Parameters
tableName: string
to: Column
optionalschemaName: string
Returns string
getChecks
Parameters
connection: AbstractSqlConnection
tableName: string
optionalschemaName: string
Returns Promise<Check<unknown>[]>
getColumns
Parameters
connection: AbstractSqlConnection
tableName: string
optionalschemaName: string
Returns Promise<any[]>
getCreateDatabaseSQL
Parameters
name: string
Returns string
getCreateIndexSQL
Parameters
tableName: string
index: Index
Returns string
getDatabaseExistsSQL
Parameters
name: string
Returns string
getDatabaseNotExistsError
Parameters
dbName: string
Returns string
getDefaultEmptyString
Returns string
getDropDatabaseSQL
Parameters
name: string
Returns string
getDropIndexSQL
Parameters
tableName: string
index: Index
Returns string
getEnumDefinitions
Parameters
connection: AbstractSqlConnection
checks: Check<unknown>[]
tableName: string
schemaName: string
Returns Promise<Dictionary<string[]>>
getForeignKeys
Parameters
connection: AbstractSqlConnection
tableName: string
optionalschemaName: string
Returns Promise<Dictionary>
getForeignKeysSQL
Parameters
tableName: string
Returns string
getIndexes
Parameters
connection: AbstractSqlConnection
tableName: string
optionalschemaName: string
Returns Promise<Index[]>
getListTablesSQL
Returns string
getManagementDbName
Returns string
getNamespaces
Parameters
connection: AbstractSqlConnection
Returns Promise<string[]>
getPreAlterTable
Parameters
tableDiff: TableDifference
safe: boolean
Returns string
getPrimaryKeys
Parameters
connection: AbstractSqlConnection
indexes: Index[] = []
tableName: string
optionalschemaName: string
Returns Promise<string[]>
getRenameColumnSQL
Parameters
tableName: string
oldColumnName: string
to: Column
optionalschemaName: string
Returns string
getRenameIndexSQL
Parameters
tableName: string
index: Index
oldIndexName: string
Returns string
getSchemaBeginning
Parameters
charset: string
Returns string
getSchemaEnd
Returns string
hasNonDefaultPrimaryKeyName
Parameters
table: DatabaseTable
Returns boolean
isImplicitIndex
Parameters
name: string
Returns boolean
loadInformationSchema
Parameters
schema: DatabaseSchema
connection: AbstractSqlConnection
tables: Table[]
Returns Promise<void>
mapForeignKeys
Parameters
fks: any[]
tableName: string
Returns Dictionary
normalizeDefaultValue
Parameters
defaultValue: string
optionallength: number
defaultValues: Dictionary<string[]> = {}
Returns string | number
pushTableQuery
Uses
raw
method injected inAbstractSqlConnection
to allow adding custom queries inside alter statements.Parameters
table: TableBuilder
expression: string
grouping: string = 'alterTable'
Returns void
supportsSchemaConstraints
Returns boolean
Implicit indexes will be ignored when diffing