Options
All
  • Public
  • Public/Protected
  • All
Menu

Organizes communication with MongoDB.

Hierarchy

  • MongoDriver

Implements

Index

Constructors

constructor

Properties

Protected connection

connection: Connection

dataTypeDefaults

dataTypeDefaults: DataTypeDefaults

Default values of length, precision and scale depends on column data type. Used in the cases when length/precision/scale is not specified by user.

Optional database

database: undefined | string

Master database used to perform all write queries.

isReplicated

isReplicated: boolean = false

Indicates if replication is enabled.

Protected mongodb

mongodb: any

Underlying mongodb library.

options

Connection options.

Optional queryRunner

queryRunner: MongoQueryRunner

Mongodb does not require to dynamically create query runner each time, because it does not have a regular connection pool as RDBMS systems have.

spatialTypes

spatialTypes: ColumnType[] = []

Gets list of spatial column data types.

supportedDataTypes

supportedDataTypes: ColumnType[] = []

Mongodb does not need to have column types because they are not used in schema sync.

treeSupport

treeSupport: boolean = false

Indicates if tree tables are supported by this driver.

withLengthColumnTypes

withLengthColumnTypes: ColumnType[] = []

Gets list of column data types that support length by a driver.

withPrecisionColumnTypes

withPrecisionColumnTypes: ColumnType[] = []

Gets list of column data types that support precision by a driver.

withScaleColumnTypes

withScaleColumnTypes: ColumnType[] = []

Gets list of column data types that support scale by a driver.

Methods

afterConnect

  • afterConnect(): Promise<void>

Protected buildConnectionUrl

  • buildConnectionUrl(): string
  • Builds connection url that is passed to underlying driver to perform connection to the mongodb database.

    Returns string

buildTableName

  • buildTableName(tableName: string, schema?: undefined | string, database?: undefined | string): string
  • Build full table name with database name, schema name and table name. E.g. "myDB"."mySchema"."myTable"

    Parameters

    • tableName: string
    • Optional schema: undefined | string
    • Optional database: undefined | string

    Returns string

connect

  • connect(): Promise<void>

createFullType

createGeneratedMap

createParameter

  • createParameter(parameterName: string, index: number): string

createQueryRunner

createSchemaBuilder

disconnect

  • disconnect(): Promise<void>

escape

  • escape(columnName: string): string

escapeQueryWithParameters

findChangedColumns

getColumnLength

isReturningSqlSupported

  • isReturningSqlSupported(): boolean

isUUIDGenerationSupported

  • isUUIDGenerationSupported(): boolean

Protected loadDependencies

  • loadDependencies(): any

normalizeDefault

normalizeIsUnique

normalizeType

  • normalizeType(column: object): string
  • Creates a database type from a given column metadata.

    Parameters

    • column: object
      • Optional length?: number | string
      • Optional precision?: number | null
      • Optional scale?: undefined | number
      • Optional type?: ColumnType

    Returns string

obtainMasterConnection

  • obtainMasterConnection(): Promise<any>

obtainSlaveConnection

  • obtainSlaveConnection(): Promise<any>

prepareHydratedValue

  • prepareHydratedValue(value: any, columnMetadata: ColumnMetadata): any

preparePersistentValue

  • preparePersistentValue(value: any, columnMetadata: ColumnMetadata): any

Protected validateOptions

Object literals

mappedDataTypes

mappedDataTypes: object

Mongodb does not need to have a strong defined mapped column types because they are not used in schema sync.

cacheDuration

cacheDuration: "int" = "int"

cacheId

cacheId: "int" = "int"

cacheIdentifier

cacheIdentifier: "int" = "int"

cacheQuery

cacheQuery: "int" = "int"

cacheResult

cacheResult: "int" = "int"

cacheTime

cacheTime: "int" = "int"

createDate

createDate: "int" = "int"

createDateDefault

createDateDefault: string = ""

migrationId

migrationId: "int" = "int"

migrationName

migrationName: "int" = "int"

migrationTimestamp

migrationTimestamp: "int" = "int"

treeLevel

treeLevel: "int" = "int"

updateDate

updateDate: "int" = "int"

updateDateDefault

updateDateDefault: string = ""

version

version: "int" = "int"

Generated using TypeDoc