Options
All
  • Public
  • Public/Protected
  • All
Menu

Organizes communication with Oracle RDBMS.

Hierarchy

  • OracleDriver

Implements

Index

Constructors

constructor

Properties

connection

connection: Connection

Connection used by driver.

Optional database

database: undefined | string

Master database used to perform all write queries.

isReplicated

isReplicated: boolean = false

Indicates if replication is enabled.

master

master: any

Pool for master database.

options

Connection options.

oracle

oracle: any

Underlying oracle library.

slaves

slaves: any[] = []

Pool for slave databases. Used in replication.

spatialTypes

spatialTypes: ColumnType[] = []

Gets list of spatial column data types.

supportedDataTypes

supportedDataTypes: ColumnType[] = ["char","nchar","nvarchar2","varchar2","long","raw","long raw","number","numeric","float","dec","decimal","integer","int","smallint","real","double precision","date","timestamp","timestamp with time zone","timestamp with local time zone","interval year to month","interval day to second","bfile","blob","clob","nclob","rowid","urowid"]

treeSupport

treeSupport: boolean = true

Indicates if tree tables are supported by this driver.

withLengthColumnTypes

withLengthColumnTypes: ColumnType[] = ["char","nchar","nvarchar2","varchar2","varchar","raw"]

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

withPrecisionColumnTypes

withPrecisionColumnTypes: ColumnType[] = ["number","float","timestamp","timestamp with time zone","timestamp with local time zone"]

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

withScaleColumnTypes

withScaleColumnTypes: ColumnType[] = ["number"]

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

Methods

afterConnect

  • afterConnect(): Promise<void>

buildTableName

  • buildTableName(tableName: string, schema?: undefined | string, database?: undefined | string): string
  • Build full table name with database name, schema name and table name. Oracle does not support table schemas. One user can have only one schema.

    Parameters

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

    Returns string

Protected closePool

  • closePool(pool: any): Promise<void>

columnTypeToNativeParameter

  • columnTypeToNativeParameter(type: ColumnType): any

connect

  • connect(): Promise<void>
  • Performs connection to the database. Based on pooling options, it can either create connection immediately, either create a pool and create connection when needed.

    Returns Promise<void>

createFullType

createGeneratedMap

createParameter

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

Protected createPool

createQueryRunner

createSchemaBuilder

disconnect

  • disconnect(): Promise<void>

escape

  • escape(columnName: string): string

escapeQueryWithParameters

findChangedColumns

getColumnLength

isReturningSqlSupported

  • isReturningSqlSupported(): boolean

isUUIDGenerationSupported

  • isUUIDGenerationSupported(): boolean

Protected loadDependencies

  • loadDependencies(): void

normalizeDefault

normalizeIsUnique

normalizeType

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

    Parameters

    • column: object
      • Optional isArray?: undefined | true | false
      • 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

Object literals

dataTypeDefaults

dataTypeDefaults: object

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.

char

char: object

length

length: number = 1

float

float: object

precision

precision: number = 126

nchar

nchar: object

length

length: number = 1

nvarchar2

nvarchar2: object

length

length: number = 255

raw

raw: object

length

length: number = 2000

timestamp

timestamp: object

precision

precision: number = 6

timestamp with local time zone

timestamp with local time zone: object

precision

precision: number = 6

timestamp with time zone

timestamp with time zone: object

precision

precision: number = 6

varchar

varchar: object

length

length: number = 255

varchar2

varchar2: object

length

length: number = 255

mappedDataTypes

mappedDataTypes: object

Orm has special columns and we need to know what database column types should be for those types. Column types are driver dependant.

cacheDuration

cacheDuration: "number" = "number"

cacheId

cacheId: "number" = "number"

cacheIdentifier

cacheIdentifier: "varchar2" = "varchar2"

cacheQuery

cacheQuery: "clob" = "clob"

cacheResult

cacheResult: "clob" = "clob"

cacheTime

cacheTime: "number" = "number"

createDate

createDate: "timestamp" = "timestamp"

createDateDefault

createDateDefault: string = "CURRENT_TIMESTAMP"

migrationId

migrationId: "number" = "number"

migrationName

migrationName: "varchar2" = "varchar2"

migrationTimestamp

migrationTimestamp: "number" = "number"

treeLevel

treeLevel: "number" = "number"

updateDate

updateDate: "timestamp" = "timestamp"

updateDateDefault

updateDateDefault: string = "CURRENT_TIMESTAMP"

version

version: "number" = "number"

Generated using TypeDoc