diff --git a/api-connection.html b/api-connection.html index cc498166d..300773023 100644 --- a/api-connection.html +++ b/api-connection.html @@ -42,7 +42,9 @@

Connection

  • connection.execute(request, parameters)
  • connection.prepare(request)
  • connection.reset(callback)
  • -
  • connection.rollbackTransaction(callback)
  • +
  • connection.rollbackTransaction(callback, [name])
  • +
  • connection.saveTransaction(callback, name)
  • +
  • connection.transaction(callback)
  • connection.unprepare(request)
  • connection.newBulkLoad(tableName, callback)
  • @@ -788,6 +790,86 @@

    connection.rollbackTransaction(callback) +

    connection.saveTransaction(callback, name)

    +

    + Set a savepoint within a transaction. +

    +

    + There should be an active transaction. + That is, beginTransaction should have been previously called. +

    +
    +
    callback
    +
    + function (err) { } +

    + The callback is called when the request to set a savepoint within the transaction has completed, + either successfully or with an error. + If an error occured then err will describe the error. +

    +

    + As only one request at a time may be executed on a connection, another request should not + be initiated until this callback is called. +

    +
    +
    err
    +
    +

    + If an error occured, a string with details of the error. +

    +
    +
    +
    +
    + +

    connection.transaction(callback)

    +

    + Run the given callback after starting a transaction, and commit or rollback the transaction afterwards. +

    +

    + This is a helper that employs beginTransaction, + commitTrnsaction, + rollbackTransaction and + saveTransaction to greatly simplify the + use of database transactions and automatically handle transaction nesting. +

    +
    +
    callback
    +
    + function (err, done) { } +

    + The callback is called when the request to start a transaction (or create a savepoint, in + the case of a nested transaction) has completed, either successfully or with an error. + If an error occured, then err will describe the error. + If no error occured, the callback should perform its work and eventually call + done with an error or null (to trigger a transaction rollback or a + transaction commit) and an additional completion callback that will be called when the request + to rollback or commit the current transaction has completed, either successfully or with an error. + Additional arguments given to done will be passed through to this callback. +

    +

    + As only one request at a time may be executed on a connection, another request should not + be initiated until the completion callback is called. +

    +
    +
    err
    +
    +

    + If an error occured, a string with details of the error. +

    +
    + +
    done
    +
    +

    + If no error occured, a function to be called to commit or rollback + the transaction. +

    +
    +
    +
    +
    +

    connection.unprepare(request)

    Release the SQL Server resources associated with a previously prepared request. diff --git a/changelog.html b/changelog.html index e228d8d25..69921ac6d 100644 --- a/changelog.html +++ b/changelog.html @@ -5,6 +5,18 @@

    Change Log

    +

    v1.9.0 2015-XX-XX

    + +

    v1.8.1 2015-01-07