可选databaseDatabase name used to perform all write queries.
todo: probably move into query runner.
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.
可选dummyDummy table name
Indicates if replication is enabled.
Orm has special columns and we need to know what database column types should be for those types. Column types are driver dependant.
可选maxMax length allowed by the DBMS for aliases (execution of queries).
Connection options.
可选parametersThe prefix used for the parameters
可选schemaSchema name used to perform all write queries.
Gets list of spatial column data types.
Gets list of supported column data types by a driver.
可选supportedReturns list of supported onDelete types by driver
可选supportedReturns list of supported onUpdate types by driver
Returns type of upsert supported by driver if any
Represent transaction support by this driver
Indicates if tree tables are supported by this driver.
可选versionDatabase version/release. Often requires a SQL query to the DB, so it is not always set
Gets list of column data types that support length by a driver.
Gets list of column data types that support precision by a driver.
Gets list of column data types that support scale by a driver.
Makes any action after connection (e.g. create extensions in Postgres driver).
Build full table name with database name, schema name and table name. E.g. myDB.mySchema.myTable
可选schema: string可选database: stringPerforms connection to the database. Depend on driver type it may create a connection pool.
Creates generated map of values generated or returned by database after INSERT query.
可选entityIndex: number可选entityNum: numberCreates an escaped parameter.
Synchronizes database schema (creates tables, indices, etc).
Closes connection with database and releases all resources.
Escapes a table name, column name or an alias.
todo: probably escape should be able to handle dots in the names and automatically escape them
Replaces parameters in the given sql with special escaping character and an array of parameter names to be passed to a query.
Differentiate columns of this table and columns from the given column metadatas columns and returns only changed.
Calculates column length taking into account the default length values.
Returns true if driver supports fulltext indices.
Returns true if driver supports RETURNING / OUTPUT statement.
Returns true if driver supports uuid values generation on its own.
Normalizes "default" value of the column.
Normalizes "isUnique" value of the column.
Transforms type of the given column to a database column type.
Obtains a new database connection to a master server. Used for replication. If replication is not setup then returns default connection's database connection.
Obtains a new database connection to a slave server. Used for replication. If replication is not setup then returns master (default) connection's database connection.
Parse a target table name or other types and return a normalized table definition.
Prepares given value to a value to be persisted, based on its column type.
Prepares given value to a value to be persisted, based on its column type and metadata.
Driver organizes TypeORM communication with specific database management system.