MongoPlatform
Hierarchy
- Platform- MongoPlatform
 
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
- supportsTransactions
- supportsUnsigned
- unmarshallArray
- usesBatchInserts
- usesBatchUpdates
- usesCascadeStatement
- usesDefaultKeyword
- usesDifferentSerializedPrimaryKey
- usesImplicitTransactions
- usesOutputStatement
- usesPivotTable
- usesReturningStatement
- validateMetadata
Constructors
constructor
- Returns MongoPlatform
Methods
inheritedallowsComparingTuples
- Returns boolean
inheritedallowsMultiInsert
- Returns boolean
cloneEmbeddable
- 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
 - Returns unknown
convertJsonToJSValue
- Parameters- value: unknown
- prop: EntityProperty<any, any>
 - Returns unknown
convertsJsonAutomatically
- Returns boolean
denormalizePrimaryKey
- Parameters- data: string | number
 - 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 void
inheritedgetArrayDeclarationSQL
- Returns string
inheritedgetBigIntTypeDeclarationSQL
- Parameters- column: { autoincrement?: boolean; length?: number; unsigned?: boolean }
- optionalautoincrement: boolean
- optionallength: number
- optionalunsigned: boolean
 - Returns string
inheritedgetBlobDeclarationSQL
- Returns string
inheritedgetBooleanTypeDeclarationSQL
- 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
inheritedgetDefaultCharset
- Returns string
inheritedgetDefaultDateTimeLength
- Returns number
inheritedgetDefaultMappedType
- Parameters- type: string
 - Returns Type<unknown, unknown>
inheritedgetDefaultPrimaryName
- 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
getExtension
- Parameters- extensionName: string
- extensionKey: string
- moduleName: string
- em: EntityManager<IDatabaseDriver<Connection>>
 - Returns T
inheritedgetFloatDeclarationSQL
- Returns string
inheritedgetFullTextIndexExpression
- Parameters- indexName: string
- schemaName: undefined | string
- tableName: string
- columns: SimpleColumnMeta[]
 - Returns string
inheritedgetFullTextWhereClause
- Parameters- prop: EntityProperty<any, any>
 - Returns string
inheritedgetIndexName
- Returns the default name of index for the given columns - 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
inheritedgetJsonIndexDefinition
- Parameters- index: { columnNames: string[] }
- columnNames: string[]
 - 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
getNamingStrategy
- 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
 
getRepositoryClass
- Returns Constructor<EntityRepository<T>>
getSchemaGenerator
- Parameters- driver: IDatabaseDriver<Connection>
- optionalem: EntityManager<IDatabaseDriver<Connection>>
 - Returns MongoSchemaGenerator
inheritedgetSchemaHelper
- Returns unknown
inheritedgetSearchJsonPropertyKey
- Parameters- path: string[]
- type: string
- aliased: boolean
- optionalvalue: unknown
 - Returns string
inheritedgetSearchJsonPropertySQL
- Parameters- path: string
- type: string
- aliased: boolean
 - Returns string
getSerializedPrimaryKeyField
- Used when serializing via toObject and toJSON methods, allows to use different PK field name (like - idinstead 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
isAllowedTopLevelOperator
- 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
lookupExtensions
- Allows registering extensions of the driver automatically (e.g. - SchemaGeneratorextension in SQL drivers).- Parameters- Returns void
marshallArray
- Parameters- values: string[]
 - Returns string
inheritednormalizeColumnType
- 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
normalizePrimaryKey
inheritedparseDate
- Parameters- value: string | number
 - Returns Date
inheritedprocessDateProperty
- Parameters- value: unknown
 - Returns string | number | Date
inheritedquoteIdentifier
- Parameters- id: string | { toString: () => string }
- toString: () => string
- quote: string = '`'
 - Returns string
inheritedquoteValue
- Parameters- value: any
 - Returns string
inheritedquoteVersionValue
- Parameters- value: number | Date
- prop: EntityProperty<any, any>
 - Returns string | number | Date
setConfig
- Parameters- Returns void
shouldHaveColumn
- Parameters- prop: EntityProperty<T, any>
- populate: PopulateOptions<T>[]
- optionalexclude: string[]
 - Returns boolean
inheritedsupportsCreatingFullTextIndex
- 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
inheritedsupportsTransactions
- Returns boolean
inheritedsupportsUnsigned
- 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
usesDifferentSerializedPrimaryKey
- Returns boolean
usesImplicitTransactions
- Returns boolean
inheritedusesOutputStatement
- Returns boolean
inheritedusesPivotTable
- Returns boolean
inheritedusesReturningStatement
- Returns boolean
validateMetadata
- Parameters- meta: EntityMetadata<any>
 - Returns void
Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId)