Skip to main content
Version: 6.4

LibSqlPlatform

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

inheritedallowsComparingTuples

  • allowsComparingTuples(): boolean
  • Returns boolean

inheritedallowsMultiInsert

  • allowsMultiInsert(): boolean
  • Returns boolean

inheritedcloneEmbeddable

  • cloneEmbeddable(data: T): T
  • Parameters

    • data: T

    Returns T

inheritedconvertDateToJSValue

  • convertDateToJSValue(value: string | Date): string
  • Parameters

    • value: string | Date

    Returns string

inheritedconvertIntervalToDatabaseValue

  • convertIntervalToDatabaseValue(value: unknown): unknown
  • Parameters

    • value: unknown

    Returns unknown

inheritedconvertIntervalToJSValue

  • convertIntervalToJSValue(value: string): unknown
  • Parameters

    • value: string

    Returns unknown

inheritedconvertJsonToDatabaseValue

  • Parameters

    Returns unknown

inheritedconvertJsonToJSValue

  • convertJsonToJSValue(value: unknown, prop: EntityProperty<any, any>): unknown
  • Parameters

    Returns unknown

inheritedconvertsJsonAutomatically

  • convertsJsonAutomatically(): boolean
  • Returns boolean

inheriteddenormalizePrimaryKey

  • denormalizePrimaryKey(data: IPrimaryKeyValue): IPrimaryKeyValue
  • Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)


    Parameters

    • data: IPrimaryKeyValue

    Returns IPrimaryKeyValue

escape

  • escape(value: any): string
  • Parameters

    • value: any

    Returns string

inheritedextractSimpleType

  • extractSimpleType(type: string): string
  • Parameters

    • type: string

    Returns string

inheritedformatQuery

  • formatQuery(sql: string, params: readonly any[]): string
  • Parameters

    • sql: string
    • params: readonly any[]

    Returns string

inheritedgenerateCustomOrder

  • generateCustomOrder(escapedColumn: string, values: unknown[]): string
  • Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END)


    Parameters

    • escapedColumn: string
    • values: unknown[]

    Returns string

inheritedgetArrayDeclarationSQL

  • getArrayDeclarationSQL(): string
  • Returns string

inheritedgetBigIntTypeDeclarationSQL

  • getBigIntTypeDeclarationSQL(column: { autoincrement?: boolean; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetBlobDeclarationSQL

  • getBlobDeclarationSQL(): string
  • Returns string

inheritedgetBooleanTypeDeclarationSQL

  • getBooleanTypeDeclarationSQL(): string
  • Returns string

inheritedgetCharTypeDeclarationSQL

  • getCharTypeDeclarationSQL(column: { length?: number }): string
  • Parameters

    • column: { length?: number }
      • optionallength: number

    Returns string

inheritedgetConfig

inheritedgetCurrentTimestampSQL

  • getCurrentTimestampSQL(length: number): string
  • Returns the SQL specific for the platform to get the current timestamp


    Parameters

    • length: number

    Returns string

inheritedgetDateTimeTypeDeclarationSQL

  • getDateTimeTypeDeclarationSQL(column: { length: number }): string
  • Parameters

    • column: { length: number }
      • length: number

    Returns string

inheritedgetDateTypeDeclarationSQL

  • getDateTypeDeclarationSQL(length?: number): string
  • Parameters

    • optionallength: number

    Returns string

inheritedgetDecimalTypeDeclarationSQL

  • getDecimalTypeDeclarationSQL(column: { precision?: number; scale?: number }): string
  • Parameters

    • column: { precision?: number; scale?: number }
      • optionalprecision: number
      • optionalscale: number

    Returns string

inheritedgetDefaultCharLength

  • getDefaultCharLength(): number
  • Returns number

inheritedgetDefaultCharset

  • getDefaultCharset(): string
  • Returns string

inheritedgetDefaultDateTimeLength

  • getDefaultDateTimeLength(): number
  • Returns number

inheritedgetDefaultMappedType

  • getDefaultMappedType(type: string): Type<unknown, unknown>
  • Parameters

    • type: string

    Returns Type<unknown, unknown>

inheritedgetDefaultPrimaryName

  • getDefaultPrimaryName(tableName: string, columns: string[]): string
  • Parameters

    • tableName: string
    • columns: string[]

    Returns string

inheritedgetDefaultSchemaName

  • getDefaultSchemaName(): undefined | string
  • Returns undefined | string

inheritedgetDefaultVarcharLength

  • getDefaultVarcharLength(): number
  • Returns number

inheritedgetDefaultVersionLength

  • getDefaultVersionLength(): number
  • Returns number

inheritedgetDoubleDeclarationSQL

  • getDoubleDeclarationSQL(): string
  • Returns string

inheritedgetEnumTypeDeclarationSQL

  • getEnumTypeDeclarationSQL(column: { autoincrement?: boolean; fieldNames: string[]; items?: unknown[]; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; fieldNames: string[]; items?: unknown[]; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • fieldNames: string[]
      • optionalitems: unknown[]
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetExceptionConverter

inheritedgetExtension

inheritedgetFloatDeclarationSQL

  • getFloatDeclarationSQL(): string
  • Returns string

inheritedgetFullTextIndexExpression

  • getFullTextIndexExpression(indexName: string, schemaName: undefined | string, tableName: string, columns: SimpleColumnMeta[]): string
  • Parameters

    • indexName: string
    • schemaName: undefined | string
    • tableName: string
    • columns: SimpleColumnMeta[]

    Returns string

inheritedgetFullTextWhereClause

  • getFullTextWhereClause(): string
  • Returns string

inheritedgetIndexName

  • getIndexName(tableName: string, columns: string[], type: primary | index | unique | foreign | sequence): string
  • Returns the default name of index for the given columns


    Parameters

    • tableName: string
    • columns: string[]
    • type: primary | index | unique | foreign | sequence

    Returns string

inheritedgetIntegerTypeDeclarationSQL

  • getIntegerTypeDeclarationSQL(column: { autoincrement?: boolean; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetIntervalTypeDeclarationSQL

  • getIntervalTypeDeclarationSQL(column: { length?: number }): string
  • Parameters

    • column: { length?: number }
      • optionallength: number

    Returns string

inheritedgetJsonDeclarationSQL

  • getJsonDeclarationSQL(): string
  • Returns string

inheritedgetJsonIndexDefinition

  • getJsonIndexDefinition(index: IndexDef): string[]
  • Parameters

    Returns string[]

inheritedgetMappedType

  • getMappedType(type: string): Type<unknown, unknown>
  • Parameters

    • type: string

    Returns Type<unknown, unknown>

inheritedgetMediumIntTypeDeclarationSQL

  • getMediumIntTypeDeclarationSQL(column: { autoincrement?: boolean; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetNamingStrategy

inheritedgetRegExpOperator

  • getRegExpOperator(val?: unknown, flags?: string): string
  • Parameters

    • optionalval: unknown
    • optionalflags: string

    Returns string

inheritedgetRegExpValue

  • getRegExpValue(val: RegExp): { $flags?: string; $re: string }
  • Parameters

    • val: RegExp

    Returns { $flags?: string; $re: string }

    • optional$flags?: string
    • $re: string

inheritedgetRepositoryClass

inheritedgetSchemaGenerator

inheritedgetSchemaHelper

  • Returns undefined | SchemaHelper

inheritedgetSearchJsonPropertyKey

  • getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean, value?: unknown): string
  • Parameters

    • path: string[]
    • type: string
    • aliased: boolean
    • optionalvalue: unknown

    Returns string

inheritedgetSearchJsonPropertySQL

  • getSearchJsonPropertySQL(path: string, type: string, aliased: boolean): string
  • Parameters

    • path: string
    • type: string
    • aliased: boolean

    Returns string

inheritedgetSerializedPrimaryKeyField

  • getSerializedPrimaryKeyField(field: string): string
  • Used when serializing via toObject and toJSON methods, allows to use different PK field name (like id instead of _id)


    Parameters

    • field: string

    Returns string

inheritedgetSmallIntTypeDeclarationSQL

  • getSmallIntTypeDeclarationSQL(column: { autoincrement?: boolean; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetTextTypeDeclarationSQL

  • getTextTypeDeclarationSQL(_column: { length?: number }): string
  • Parameters

    • _column: { length?: number }
      • optionallength: number

    Returns string

inheritedgetTimeTypeDeclarationSQL

  • getTimeTypeDeclarationSQL(length?: number): string
  • Parameters

    • optionallength: number

    Returns string

inheritedgetTimezone

  • getTimezone(): undefined | string
  • Returns undefined | string

inheritedgetTinyIntTypeDeclarationSQL

  • getTinyIntTypeDeclarationSQL(column: { autoincrement?: boolean; length?: number; unsigned?: boolean }): string
  • Parameters

    • column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
      • optionalautoincrement: boolean
      • optionallength: number
      • optionalunsigned: boolean

    Returns string

inheritedgetUuidTypeDeclarationSQL

  • getUuidTypeDeclarationSQL(column: { length?: number }): string
  • Parameters

    • column: { length?: number }
      • optionallength: number

    Returns string

inheritedgetVarcharTypeDeclarationSQL

  • getVarcharTypeDeclarationSQL(column: { length?: number }): string
  • Parameters

    • column: { length?: number }
      • optionallength: number

    Returns string

inheritedindexForeignKeys

  • indexForeignKeys(): boolean
  • Returns boolean

inheritedisAllowedTopLevelOperator

  • isAllowedTopLevelOperator(operator: string): boolean
  • Parameters

    • operator: string

    Returns boolean

inheritedisBigIntProperty

  • Parameters

    Returns boolean

inheritedisNumericColumn

  • isNumericColumn(mappedType: Type<unknown, unknown>): boolean
  • Parameters

    • mappedType: Type<unknown, unknown>

    Returns boolean

inheritedisNumericProperty

  • isNumericProperty(prop: EntityProperty<any, any>, ignoreCustomType?: boolean): boolean
  • Parameters

    Returns boolean

inheritedisPopulated

  • isPopulated(key: string, populate: boolean | PopulateOptions<T>[]): boolean
  • Parameters

    Returns boolean

inheritedisRaw

  • isRaw(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

inheritedlookupExtensions

inheritedmarshallArray

  • marshallArray(values: string[]): string
  • Parameters

    • values: string[]

    Returns string

inheritednormalizeColumnType

  • normalizeColumnType(type: string, options?: { length?: number; precision?: number; scale?: number }): string
  • This should be used only to compare types, it can strip some information like the length.


    Parameters

    • type: string
    • options: { length?: number; precision?: number; scale?: number } = {}
      • optionallength: number
      • optionalprecision: number
      • optionalscale: number

    Returns string

inheritednormalizePrimaryKey

  • normalizePrimaryKey(data: IPrimaryKeyValue | Primary<T>): T
  • Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string)


    Parameters

    • data: IPrimaryKeyValue | Primary<T>

    Returns T

inheritedparseDate

  • parseDate(value: string | number): Date
  • Parameters

    • value: string | number

    Returns Date

inheritedprocessDateProperty

  • processDateProperty(value: unknown): string | number | Date
  • This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp.


    Parameters

    • value: unknown

    Returns string | number | Date

inheritedquoteIdentifier

  • quoteIdentifier(id: string, quote?: string): string
  • Parameters

    • id: string
    • quote: string = '`'

    Returns string

inheritedquoteValue

  • quoteValue(value: any): string
  • Parameters

    • value: any

    Returns string

inheritedquoteVersionValue

  • quoteVersionValue(value: number | Date, prop: EntityProperty<any, any>): string | number | Date
  • Parameters

    Returns string | number | Date

inheritedsetConfig

inheritedshouldHaveColumn

  • Parameters

    Returns boolean

inheritedsupportsCreatingFullTextIndex

  • supportsCreatingFullTextIndex(): boolean
  • Returns boolean

inheritedsupportsCustomPrimaryKeyNames

  • supportsCustomPrimaryKeyNames(): boolean
  • Returns boolean

inheritedsupportsDownMigrations

  • supportsDownMigrations(): boolean
  • Currently not supported due to how knex does complex sqlite diffing (always based on current schema)


    Returns boolean

inheritedsupportsMultipleCascadePaths

  • supportsMultipleCascadePaths(): boolean
  • Returns boolean

inheritedsupportsMultipleStatements

  • supportsMultipleStatements(): boolean
  • Returns boolean

inheritedsupportsNativeEnums

  • supportsNativeEnums(): boolean
  • for postgres native enums


    Returns boolean

inheritedsupportsSchemas

  • supportsSchemas(): boolean
  • Returns boolean

inheritedsupportsTransactions

  • supportsTransactions(): boolean
  • Returns boolean

inheritedsupportsUnsigned

  • supportsUnsigned(): boolean
  • Returns boolean

inheritedunmarshallArray

  • unmarshallArray(value: string): string[]
  • Parameters

    • value: string

    Returns string[]

inheritedusesBatchInserts

  • usesBatchInserts(): boolean
  • Whether or not the driver supports retuning list of created PKs back when multi-inserting


    Returns boolean

inheritedusesBatchUpdates

  • usesBatchUpdates(): boolean
  • Whether or not the driver supports updating many records at once


    Returns boolean

inheritedusesCascadeStatement

  • usesCascadeStatement(): boolean
  • Returns boolean

inheritedusesDefaultKeyword

  • usesDefaultKeyword(): boolean
  • Returns boolean

inheritedusesDifferentSerializedPrimaryKey

  • usesDifferentSerializedPrimaryKey(): boolean
  • Returns boolean

inheritedusesImplicitTransactions

  • usesImplicitTransactions(): boolean
  • Returns boolean

inheritedusesOutputStatement

  • usesOutputStatement(): boolean
  • Returns boolean

inheritedusesPivotTable

  • usesPivotTable(): boolean
  • Returns boolean

inheritedusesReturningStatement

  • usesReturningStatement(): boolean
  • Returns boolean

inheritedvalidateMetadata

  • Parameters

    Returns void

Page Options