trait Connection extends Object with IEventEmitter

MySQL Connection

Annotations
@RawJSType() @native()
Linear Supertypes
IEventEmitter, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Connection
  2. IEventEmitter
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addListener(eventName: String, listener: Function): Connection.this.type
    Definition Classes
    IEventEmitter
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def beginTransaction(callback: Function): Unit

    Starts a new transaction

    Starts a new transaction

    Example:
    1. connection.beginTransaction(function(err) { ... })

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def commit(callback: Function): Unit

    Commits a transaction

    Commits a transaction

    callback

    the error callback

    Example:
    1. commit(function(err) { ... })

  9. val config: ConnectionOptions
  10. def connect(callback: Function): Unit

    Creates a new connection

    Creates a new connection

    callback

    the results callback

  11. def destroy(): Unit

    An alternative way to end the connection is to call the destroy() method.

    An alternative way to end the connection is to call the destroy() method. This will cause an immediate termination of the underlying socket. Additionally destroy() guarantees that no more events or callbacks will be triggered for the connection.

  12. val domain: String
    Definition Classes
    IEventEmitter
  13. def emit(name: String, args: Any*): Any
    Definition Classes
    IEventEmitter
  14. def end(callback: Function): Unit

    There are two ways to end a connection.

    There are two ways to end a connection. Terminating a connection gracefully is done by calling the end() method

    callback

    the error callback

    Example:
    1. connection.end(function(err) { ... })

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  19. def getMaxListeners(): Int
    Definition Classes
    IEventEmitter
  20. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  24. def listenerCount(eventName: String): Int
    Definition Classes
    IEventEmitter
  25. def listeners(eventName: String): Array[Function]
    Definition Classes
    IEventEmitter
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  29. def on(eventName: String, listener: Function): Connection.this.type
    Definition Classes
    IEventEmitter
  30. def once(eventName: String, listener: Function): Connection.this.type
    Definition Classes
    IEventEmitter
  31. def ping(callback: Function): Unit

    A ping packet can be sent over a connection using the connection.ping method.

    A ping packet can be sent over a connection using the connection.ping method. This method will send a ping packet to the server and when the server responds, the callback will fire. If an error occurred, the callback will fire with an error argument.

    Example:
    1. connection.ping(function (err) { ... })

  32. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  33. def query(options: QueryOptions, params: Array[Any], callback: Function): Unit

    Asynchronously executes a query

    Asynchronously executes a query

    options

    the given query options

    params

    the given query parameters

    callback

    the results callback

    Example:
    1. connection.query('INSERT INTO log SET data=?', log, function(err, result) { ... })

  34. def query(options: QueryOptions, callback: Function): Unit

    Asynchronously executes a query

    Asynchronously executes a query

    options

    the given query options

    callback

    the results callback

    Example:
    1. connection.query(options, function(err, results) { ... })

  35. def query(query: String, callback: Function): Unit

    Asynchronously executes a query

    Asynchronously executes a query

    query

    the given query string

    callback

    the results callback

    Example:
    1. connection.query('INSERT INTO log SET data=?', log, function(err, result) { ... })

  36. def query(query: String): Readable

    Executes a query and streams the results

    Executes a query and streams the results

    query

    the given query string

    returns

    a readable for streaming the results

  37. def release(): Unit

    When you are done with a connection, just call connection.release() and the connection will return to the pool, ready to be used again by someone else.

  38. def removeAllListeners(): Connection.this.type
    Definition Classes
    IEventEmitter
  39. def removeAllListeners(eventName: String): Connection.this.type
    Definition Classes
    IEventEmitter
  40. def removeListener(eventName: String, listener: Function): Connection.this.type
    Definition Classes
    IEventEmitter
  41. def rollback(callback: Function): Unit

    Rolls back a transaction

    Rolls back a transaction

    callback

    the response callback (empty arguments)

  42. def setMaxListeners(n: Int): Connection.this.type
    Definition Classes
    IEventEmitter
  43. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  44. def toLocaleString(): String
    Definition Classes
    Object
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. val usingDomains: Boolean
    Definition Classes
    IEventEmitter
  47. def valueOf(): Any
    Definition Classes
    Object
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from IEventEmitter

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped