![]() ![]() dateStrings: Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather than.This option is ignored if supportBigNumbers is disabled. (which happens when they exceed the range), otherwise they will be returned as Objects only when they cannot be accurately represented with JavaScript Number objects (BIGINT and DECIMAL columns) to be always returned as JavaScript String objects (Default: false).Įnabling supportBigNumbers but leaving bigNumberStrings disabled will return big numbers as String bigNumberStrings: Enabling both supportBigNumbers and bigNumberStrings forces big numbers.You should enable this option (Default: false). supportBigNumbers: When dealing with big numbers (BIGINT and DECIMAL columns) in the database,.queryFormat: A custom query format function.typeCast: Determines if column values should be converted to native.insecureAuth: Allow connecting to MySQL instances that ask for the old.stringifyObjects: Stringify objects instead of converting to values.connectTimeout: The milliseconds before a timeout occurs during the initial connection.This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. This is used to type cast server date/time values to JavaScript Date object and vice versa. timezone: The timezone configured on the MySQL server.Then the default collation for that charset is used. If a SQL-level charset is specified (like utf8mb4) This is called "collation" in the SQL-level charset: The charset for the connection.database: Name of the database to use for this connection (Optional).password: The password of that MySQL user.user: The MySQL user to authenticate as.socketPath: The path to a unix domain socket to connect to.localAddress: The source IP address to use for TCP connection.host: The hostname of the database you are connecting to.When establishing a connection, you can set the following options: Any type of connection error (handshake or network) is consideredĪ fatal error, see the Error Handling section for more The recommended way to establish a connection is this:ĭepending on how you like to handle your errors, either method may beĪppropriate. ![]()
0 Comments
Leave a Reply. |