MySqlPlatform
Hierarchy
- AbstractSqlPlatform
- MySqlPlatform
Index
Constructors
Methods
- allowsComparingTuples
- allowsMultiInsert
- cloneEmbeddable
- convertDateToJSValue
- convertIntervalToDatabaseValue
- convertIntervalToJSValue
- convertJsonToDatabaseValue
- convertJsonToJSValue
- convertsJsonAutomatically
- denormalizePrimaryKey
- escape
- extractSimpleType
- formatQuery
- generateCustomOrder
- getArrayDeclarationSQL
- getBigIntTypeDeclarationSQL
- getBlobDeclarationSQL
- getBooleanTypeDeclarationSQL
- getCharTypeDeclarationSQL
- getConfig
- getCurrentTimestampSQL
- getDateTimeTypeDeclarationSQL
- getDateTypeDeclarationSQL
- getDecimalTypeDeclarationSQL
- getDefaultCharLength
- getDefaultCharset
- getDefaultDateTimeLength
- getDefaultMappedType
- getDefaultPrimaryName
- getDefaultSchemaName
- getDefaultVarcharLength
- getDefaultVersionLength
- getDoubleDeclarationSQL
- getEnumTypeDeclarationSQL
- getExceptionConverter
- getExtension
- getFloatDeclarationSQL
- getFullTextIndexExpression
- getFullTextWhereClause
- getIndexName
- getIntegerTypeDeclarationSQL
- getIntervalTypeDeclarationSQL
- getJsonDeclarationSQL
- getJsonIndexDefinition
- getMappedType
- getMediumIntTypeDeclarationSQL
- getNamingStrategy
- getRegExpOperator
- getRegExpValue
- getRepositoryClass
- getSchemaGenerator
- getSchemaHelper
- getSearchJsonPropertyKey
- getSearchJsonPropertySQL
- getSerializedPrimaryKeyField
- getSmallIntTypeDeclarationSQL
- getTextTypeDeclarationSQL
- getTimeTypeDeclarationSQL
- getTimezone
- getTinyIntTypeDeclarationSQL
- getUuidTypeDeclarationSQL
- getVarcharTypeDeclarationSQL
- indexForeignKeys
- isAllowedTopLevelOperator
- isBigIntProperty
- isNumericColumn
- isNumericProperty
- isPopulated
- isRaw
- lookupExtensions
- marshallArray
- normalizeColumnType
- normalizePrimaryKey
- parseDate
- processDateProperty
- quoteIdentifier
- quoteValue
- quoteVersionValue
- setConfig
- shouldHaveColumn
- supportsCreatingFullTextIndex
- supportsCustomPrimaryKeyNames
- supportsDownMigrations
- supportsMultipleCascadePaths
- supportsMultipleStatements
- supportsNativeEnums
- supportsSchemas
- supportsTransactions
- supportsUnsigned
- unmarshallArray
- usesBatchInserts
- usesBatchUpdates
- usesCascadeStatement
- usesDefaultKeyword
- usesDifferentSerializedPrimaryKey
- usesImplicitTransactions
- usesOutputStatement
- usesPivotTable
- usesReturningStatement
- validateMetadata
Constructors
constructor
Returns MySqlPlatform
Methods
inheritedallowsComparingTuples
Returns boolean
inheritedallowsMultiInsert
Returns boolean
inheritedcloneEmbeddable
Parameters
data: T
Returns T
inheritedconvertDateToJSValue
Parameters
value: string | Date
Returns string
inheritedconvertIntervalToDatabaseValue
Parameters
value: unknown
Returns unknown
inheritedconvertIntervalToJSValue
Parameters
value: string
Returns unknown
convertJsonToDatabaseValue
Parameters
value: unknown
optionalcontext: TransformContext
Returns unknown
inheritedconvertJsonToJSValue
Parameters
value: unknown
prop: EntityProperty<any, any>
Returns unknown
inheritedconvertsJsonAutomatically
Returns boolean
inheriteddenormalizePrimaryKey
Parameters
data: IPrimaryKeyValue
Returns IPrimaryKeyValue
inheritedescape
Parameters
value: any
Returns string
inheritedextractSimpleType
Parameters
type: string
Returns string
inheritedformatQuery
Parameters
sql: string
params: readonly any[]
Returns string
inheritedgenerateCustomOrder
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
Returns string
inheritedgetBigIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetBlobDeclarationSQL
Returns string
getBooleanTypeDeclarationSQL
Returns string
inheritedgetCharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetConfig
inheritedgetCurrentTimestampSQL
Returns the SQL specific for the platform to get the current timestamp
Parameters
optionallength: number
Returns string
inheritedgetDateTimeTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetDateTypeDeclarationSQL
Parameters
optionallength: number
Returns string
inheritedgetDecimalTypeDeclarationSQL
Parameters
column: { precision?: number; scale?: number }
optionalprecision: number
optionalscale: number
Returns string
inheritedgetDefaultCharLength
Returns number
getDefaultCharset
Returns string
inheritedgetDefaultDateTimeLength
Returns number
getDefaultMappedType
Parameters
type: string
Returns Type<unknown, unknown>
getDefaultPrimaryName
Parameters
tableName: string
columns: string[]
Returns string
inheritedgetDefaultSchemaName
Returns undefined | string
inheritedgetDefaultVarcharLength
Returns number
inheritedgetDefaultVersionLength
Returns number
inheritedgetDoubleDeclarationSQL
Returns string
inheritedgetEnumTypeDeclarationSQL
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
Returns ExceptionConverter
inheritedgetExtension
Parameters
extensionName: string
extensionKey: string
moduleName: string
em: EntityManager<IDatabaseDriver<Connection>>
Returns T
inheritedgetFloatDeclarationSQL
Returns string
getFullTextIndexExpression
Parameters
indexName: string
schemaName: undefined | string
tableName: string
columns: SimpleColumnMeta[]
Returns string
getFullTextWhereClause
Returns string
getIndexName
Returns the default name of index for the given columns cannot go past 64 character length for identifiers in MySQL
Parameters
tableName: string
columns: string[]
type: primary | index | unique | foreign | sequence
Returns string
inheritedgetIntegerTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetIntervalTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetJsonDeclarationSQL
Returns string
getJsonIndexDefinition
Parameters
index: IndexDef
Returns string[]
inheritedgetMappedType
Parameters
type: string
Returns Type<unknown, unknown>
inheritedgetMediumIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetNamingStrategy
Returns new () => NamingStrategy
Returns NamingStrategy
inheritedgetRegExpOperator
Parameters
optionalval: unknown
optionalflags: string
Returns string
inheritedgetRegExpValue
Parameters
val: RegExp
Returns { $flags?: string; $re: string }
optional$flags?: string
$re: string
inheritedgetRepositoryClass
Returns Constructor<EntityRepository<T>>
inheritedgetSchemaGenerator
Parameters
driver: IDatabaseDriver<Connection>
optionalem: EntityManager<IDatabaseDriver<Connection>>
Returns SqlSchemaGenerator
inheritedgetSchemaHelper
Returns undefined | SchemaHelper
inheritedgetSearchJsonPropertyKey
Parameters
path: string[]
type: string
aliased: boolean
optionalvalue: unknown
Returns string
inheritedgetSearchJsonPropertySQL
Parameters
path: string
type: string
aliased: boolean
Returns string
inheritedgetSerializedPrimaryKeyField
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
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetTextTypeDeclarationSQL
Parameters
_column: { length?: number }
optionallength: number
Returns string
inheritedgetTimeTypeDeclarationSQL
Parameters
optionallength: number
Returns string
inheritedgetTimezone
Returns undefined | string
inheritedgetTinyIntTypeDeclarationSQL
Parameters
column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
optionalautoincrement: boolean
optionallength: number
optionalunsigned: boolean
Returns string
inheritedgetUuidTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedgetVarcharTypeDeclarationSQL
Parameters
column: { length?: number }
optionallength: number
Returns string
inheritedindexForeignKeys
Returns boolean
inheritedisAllowedTopLevelOperator
Parameters
operator: string
Returns boolean
inheritedisBigIntProperty
Parameters
prop: EntityProperty<any, any>
Returns boolean
inheritedisNumericColumn
Parameters
mappedType: Type<unknown, unknown>
Returns boolean
inheritedisNumericProperty
Parameters
prop: EntityProperty<any, any>
ignoreCustomType: boolean = false
Returns boolean
inheritedisPopulated
Parameters
key: string
populate: boolean | PopulateOptions<T>[]
Returns boolean
inheritedisRaw
Parameters
value: any
Returns boolean
inheritedlookupExtensions
Allows registering extensions of the driver automatically (e.g.
SchemaGenerator
extension in SQL drivers).Parameters
Returns void
inheritedmarshallArray
Parameters
values: string[]
Returns string
normalizeColumnType
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
Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string)
Parameters
data: IPrimaryKeyValue | Primary<T>
Returns T
inheritedparseDate
Parameters
value: string | number
Returns Date
inheritedprocessDateProperty
Parameters
value: unknown
Returns string | number | Date
inheritedquoteIdentifier
Parameters
id: string
quote: string = '`'
Returns string
inheritedquoteValue
Parameters
value: any
Returns string
inheritedquoteVersionValue
Parameters
value: number | Date
prop: EntityProperty<any, any>
Returns string | number | Date
inheritedsetConfig
Parameters
Returns void
inheritedshouldHaveColumn
Parameters
prop: EntityProperty<T, any>
populate: boolean | PopulateOptions<T>[]
optionalexclude: string[]
includeFormulas: boolean = true
Returns boolean
supportsCreatingFullTextIndex
Returns boolean
inheritedsupportsCustomPrimaryKeyNames
Returns boolean
inheritedsupportsDownMigrations
Currently not supported due to how knex does complex sqlite diffing (always based on current schema)
Returns boolean
inheritedsupportsMultipleCascadePaths
Returns boolean
inheritedsupportsMultipleStatements
Returns boolean
inheritedsupportsNativeEnums
for postgres native enums
Returns boolean
inheritedsupportsSchemas
Returns boolean
inheritedsupportsTransactions
Returns boolean
supportsUnsigned
Returns boolean
inheritedunmarshallArray
Parameters
value: string
Returns string[]
inheritedusesBatchInserts
Whether or not the driver supports retuning list of created PKs back when multi-inserting
Returns boolean
inheritedusesBatchUpdates
Whether or not the driver supports updating many records at once
Returns boolean
inheritedusesCascadeStatement
Returns boolean
inheritedusesDefaultKeyword
Returns boolean
inheritedusesDifferentSerializedPrimaryKey
Returns boolean
inheritedusesImplicitTransactions
Returns boolean
inheritedusesOutputStatement
Returns boolean
inheritedusesPivotTable
Returns boolean
inheritedusesReturningStatement
Returns boolean
inheritedvalidateMetadata
Parameters
meta: EntityMetadata<any>
Returns void
Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)