Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings disabled will return big numbers as String objects only when they cannot be accurately represented with JavaScript Number objects (which happens when they exceed the [-2^53, +2^53] range), otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.
Allows to setup cache options.
The charset for the connection. This is called "collation" in the SQL-level of MySQL (like utf8_general_ci). If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used. Default: 'UTF8_GENERAL_CI'
CLI settings.
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
Database name to connect to.
Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects. Can be true/false or an array of type names to keep as strings.
Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed. (Default: false)
Drops the schema each time connection is being established. Be careful with this option and don't use this in production - otherwise you'll lose all production data. This option is useful during debug and development.
Entities to be loaded for this connection. Accepts both entity classes and directories where from entities need to be loaded. Directories support glob patterns.
Prefix to use on all tables (collections) of this connection in the database.
Extra connection options to be passed to the underlying driver.
todo: deprecate this and move all database-specific types into hts own connection options object.
List of connection flags to use other than the default ones. It is also possible to blacklist default ones. For more information, check https://github.com/mysqljs/mysql#connection-flags.
Database host.
Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)
Logger instance used to log queries and events in the ORM.
Logging options.
Maximum number of milliseconds query should be executed before logger log a warning.
Migrations to be loaded for this connection. Accepts both migration classes and directories where from migrations need to be loaded. Directories support glob patterns.
Indicates if migrations should be auto run on every application launch. Alternative to it, you can use CLI and run migrations:run command.
Migrations table name, in case of different name from "migrations". Accepts single string name.
Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks. (Default: false)
Connection name. If connection name is not given then it will be called "default". Different connections must have different names.
Naming strategy to be used to name tables and columns in the database.
Database password.
Database host port.
Replication setup.
Object with ssl parameters or a string containing name of ssl profile.
Subscribers to be loaded for this connection. Accepts both subscriber classes and directories where from subscribers need to be loaded. Directories support glob patterns.
When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)
Indicates if database schema should be auto created on every application launch. Be careful with this option and don't use this in production - otherwise you can lose production data. This option is useful during debug and development. Alternative to it, you can use CLI and run schema:sync command.
Note that for MongoDB database it does not create schema, because MongoDB is schemaless. Instead, it syncs just by creating indices.
The timezone configured on the MySQL server. This is used to type cast server date/time values to JavaScript Date object and vice versa. This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')
Generates stack traces on Error to include call site of library entrance ("long stack traces"). Slight performance penalty for most calls. (Default: true)
Database type.
Connection url where perform connection to.
Database username.
Generated using TypeDoc
MySQL specific connection options.
https://github.com/mysqljs/mysql#connection-options