import { type Driver } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";
Driver organizes TypeORM communication with specific database management system.
Properties
Master database 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.
Gets list of column data types that support precision by a driver.
Orm has special columns and we need to know what database column types should be for those types. Column types are driver dependant.
Methods
Performs connection to the database. Depend on driver type it may create a connection pool.
Makes any action after connection (e.g. create extensions in Postgres driver).
Creates a query runner used for common queries.
Replaces parameters in the given sql with special escaping character and an array of parameter names to be passed to a query.
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
Build full table name with database name, schema name and table name. E.g. "myDB"."mySchema"."myTable"
Prepares given value to a value to be persisted, based on its column type and metadata.
Prepares given value to a value to be persisted, based on its column type.
Transforms type of the given column to a database column type.
Calculates column length taking into account the default length values.
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.
Creates generated map of values generated or returned by database after INSERT query.
Differentiate columns of this table and columns from the given column metadatas columns and returns only changed.
Returns true if driver supports uuid values generation on its own.