class ConnectionOptions extends Object
Connection Options
- Annotations
- @RawJSType() @ScalaJSDefined()
- Alphabetic
- By Inheritance
- ConnectionOptions
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ConnectionOptions(host: UndefOr[String] = js.undefined, port: UndefOr[Int] = js.undefined, localAddress: UndefOr[String] = js.undefined, socketPath: UndefOr[String] = js.undefined, user: UndefOr[String] = js.undefined, password: UndefOr[String] = js.undefined, database: UndefOr[String] = js.undefined, charset: UndefOr[String] = js.undefined, timezone: UndefOr[String] = js.undefined, connectTimeout: UndefOr[Boolean] = js.undefined, stringifyObjects: UndefOr[Boolean] = js.undefined, insecureAuth: UndefOr[Boolean] = js.undefined, typeCast: UndefOr[Boolean] = js.undefined, queryFormat: UndefOr[String] = js.undefined, supportBigNumbers: UndefOr[Boolean] = js.undefined, bigNumberStrings: UndefOr[Boolean] = js.undefined, dateStrings: UndefOr[String] = js.undefined, debug: UndefOr[Boolean] = js.undefined, trace: UndefOr[Boolean] = js.undefined, multipleStatements: UndefOr[Boolean] = js.undefined, flags: UndefOr[String] = js.undefined, ssl: UndefOr[SSLOptions] = js.undefined)
- host
The hostname of the database you are connecting to. (Default: localhost)
- port
The port number to connect to. (Default: 3306)
- localAddress
The source IP address to use for TCP connection. (Optional)
- socketPath
The path to a unix domain socket to connect to. When used host and port are ignored.
- user
The MySQL user to authenticate as.
- password
The password of that MySQL user.
- database
Name of the database to use for this connection (Optional).
- charset
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')
- timezone
The timezone used to store local dates. (Default: 'local')
- connectTimeout
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
- stringifyObjects
Stringify objects instead of converting to values. See issue #501. (Default: 'false')
- insecureAuth
Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)
- typeCast
Determines if column values should be converted to native JavaScript types. (Default: true)
- queryFormat
A custom query format function. See Custom format.
- supportBigNumbers
When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false).
- bigNumberStrings
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] (http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-253, +253] range), otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.
- dateStrings
Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects. (Default: false)
- debug
Prints protocol details to stdout. (Default: false)
- trace
Generates stack traces on Error to include call site of library entrance ("long stack traces"). Slight performance penalty for most calls. (Default: true)
- multipleStatements
Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks. (Default: false)
- flags
List of connection flags to use other than the default ones. It is also possible to blacklist default ones. For more information, check Connection Flags.
- ssl
object with ssl parameters or a string containing name of ssl profile. See SSL options.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- var bigNumberStrings: UndefOr[Boolean]
- var charset: UndefOr[String]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- var connectTimeout: UndefOr[Boolean]
- var database: UndefOr[String]
- var dateStrings: UndefOr[String]
- var debug: UndefOr[Boolean]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- var flags: UndefOr[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- var host: UndefOr[String]
- var insecureAuth: UndefOr[Boolean]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- var localAddress: UndefOr[String]
- var multipleStatements: UndefOr[Boolean]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- var password: UndefOr[String]
- var port: UndefOr[Int]
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- var queryFormat: UndefOr[String]
- var socketPath: UndefOr[String]
- var ssl: UndefOr[SSLOptions]
- var stringifyObjects: UndefOr[Boolean]
- var supportBigNumbers: UndefOr[Boolean]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- var timezone: UndefOr[String]
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- var trace: UndefOr[Boolean]
- var typeCast: UndefOr[Boolean]
- var user: UndefOr[String]
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )