Version: 4.3

Class: SqliteSchemaHelper

Hierarchy

  • SchemaHelper

    SqliteSchemaHelper

Methods

databaseExists

databaseExists(connection: Connection, name: string): Promise<boolean>

Overrides MySqlSchemaHelper.databaseExists

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:110

Parameters:

NameType
connectionConnection
namestring

Returns: Promise<boolean>


finalizeTable

finalizeTable(table: TableBuilder, charset: string): void

Inherited from PostgreSqlSchemaHelper.finalizeTable

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:8

Parameters:

NameType
tableTableBuilder
charsetstring

Returns: void


getColumns

getColumns(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<any[]>

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:49

Parameters:

NameType
connectionAbstractSqlConnection
tableNamestring
schemaName?string

Returns: Promise<any[]>


getCreateDatabaseSQL

getCreateDatabaseSQL(name: string): string

Inherited from MySqlSchemaHelper.getCreateDatabaseSQL

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:34

Parameters:

NameType
namestring

Returns: string


getDatabaseExistsSQL

getDatabaseExistsSQL(name: string): string

Inherited from MySqlSchemaHelper.getDatabaseExistsSQL

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:36

Parameters:

NameType
namestring

Returns: string


getDatabaseNotExistsError

getDatabaseNotExistsError(dbName: string): string

Inherited from MySqlSchemaHelper.getDatabaseNotExistsError

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:37

Parameters:

NameType
dbNamestring

Returns: string


getDefaultEmptyString

getDefaultEmptyString(): string

Inherited from MySqlSchemaHelper.getDefaultEmptyString

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:39

Returns: string


getDropDatabaseSQL

getDropDatabaseSQL(name: string): string

Inherited from MySqlSchemaHelper.getDropDatabaseSQL

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:35

Parameters:

NameType
namestring

Returns: string


getEnumDefinitions

getEnumDefinitions(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<Dictionary>

Inherited from SqliteSchemaHelper.getEnumDefinitions

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:20

Parameters:

NameType
connectionAbstractSqlConnection
tableNamestring
schemaName?string

Returns: Promise<Dictionary>


getForeignKeys

getForeignKeys(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<Dictionary>

Inherited from MySqlSchemaHelper.getForeignKeys

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:19

Parameters:

NameType
connectionAbstractSqlConnection
tableNamestring
schemaName?string

Returns: Promise<Dictionary>


getForeignKeysSQL

getForeignKeysSQL(tableName: string): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:88

Parameters:

NameType
tableNamestring

Returns: string


getIndexName

getIndexName(tableName: string, columns: string[], type: "index" | "unique" | "foreign"): string

Inherited from MySqlSchemaHelper.getIndexName

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:29

Returns the default name of index for the given columns

Parameters:

NameType
tableNamestring
columnsstring[]
type"index" | "unique" | "foreign"

Returns: string


getIndexes

getIndexes(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<Index[]>

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:68

Parameters:

NameType
connectionAbstractSqlConnection
tableNamestring
schemaName?string

Returns: Promise<Index[]>


getListTablesSQL

getListTablesSQL(): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:44

Returns: string


getManagementDbName

getManagementDbName(): string

Inherited from MySqlSchemaHelper.getManagementDbName

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:38

Returns: string


getPrimaryKeys

getPrimaryKeys(connection: AbstractSqlConnection, indexes: Dictionary, tableName: string, schemaName?: string): Promise<string[]>

Overrides MySqlSchemaHelper.getPrimaryKeys

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:61

Parameters:

NameType
connectionAbstractSqlConnection
indexesDictionary
tableNamestring
schemaName?string

Returns: Promise<string[]>


getRenameColumnSQL

getRenameColumnSQL(tableName: string, from: Column, to: EntityProperty, idx?: number): string

Overrides PostgreSqlSchemaHelper.getRenameColumnSQL

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:84

Parameters:

NameTypeDefault value
tableNamestring-
fromColumn-
toEntityProperty-
idxnumber0

Returns: string


getSchemaBeginning

getSchemaBeginning(charset: string): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:19

Parameters:

NameType
charsetstring

Returns: string


getSchemaEnd

getSchemaEnd(): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:23

Returns: string


getTypeDefinition

getTypeDefinition(prop: EntityProperty): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:31

Parameters:

NameType
propEntityProperty

Returns: string


getTypeFromDefinition

getTypeFromDefinition(type: string, defaultType: string): string

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:36

Parameters:

NameType
typestring
defaultTypestring

Returns: string


indexForeignKeys

indexForeignKeys(): boolean

Inherited from MySqlSchemaHelper.indexForeignKeys

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:12

Returns: boolean


isImplicitIndex

isImplicitIndex(name: string): boolean

Overrides MySqlSchemaHelper.isImplicitIndex

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:114

Parameters:

NameType
namestring

Returns: boolean


isSame

isSame(prop: EntityProperty, type: Column, idx?: number): IsSame

Overrides void

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:27

Parameters:

NameType
propEntityProperty
typeColumn
idx?number

Returns: IsSame


mapForeignKeys

mapForeignKeys(fks: any[]): Dictionary

Overrides MySqlSchemaHelper.mapForeignKeys

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:92

Parameters:

NameType
fksany[]

Returns: Dictionary


normalizeDefaultValue

normalizeDefaultValue(defaultValue: string, length: number, defaultValues?: Dictionary<string[]>): string | number

Inherited from SqliteSchemaHelper.normalizeDefaultValue

Defined in packages/knex/dist/schema/SchemaHelper.d.ts:33

Parameters:

NameType
defaultValuestring
lengthnumber
defaultValues?Dictionary<string[]>

Returns: string | number


supportsColumnAlter

supportsColumnAlter(): boolean

Overrides MySqlSchemaHelper.supportsColumnAlter

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:106

Returns: boolean


supportsSchemaConstraints

supportsSchemaConstraints(): boolean

Overrides MySqlSchemaHelper.supportsSchemaConstraints

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:40

Returns: boolean

Object literals

TYPES

Static Readonly TYPES: object

Defined in packages/sqlite/src/SqliteSchemaHelper.ts:6

Properties:

NameTypeValue
Datestring[]['datetime', 'text']
bigintstring[]['integer']
booleanstring[]['integer', 'int']
datestring[]['datetime', 'text']
numberstring[]['integer', 'int', 'tinyint', 'smallint', 'bigint']
objectstring[]['text']
smallintstring[]['integer']
stringstring[]['varchar', 'text']
textstring[]['text']
tinyintstring[]['integer']
Last updated on by Martin Adámek