src/db/execute.js
function assertContext() {
  return new Promise(function(resolve, reject) {
    // Check if we're in an active session
    let d = process.domain
    if (d == null ||
        d.context == null ||
        d.context.bardo == null) {
      // Begin the session before proceeding
      return begin().then((ctx) => {
        resolve(ctx)
      }).catch(reject)
    }

    // Continue onwards with our active domain
    return resolve(d.context.bardo)
  })
}
function assertContext() {
  return new Promise(function(resolve, reject) {
    // Check if we're in an active session
    let d = process.domain
    if (d == null ||
        d.context == null ||
        d.context.bardo == null) {
      // Begin the session before proceeding
      return begin().then((ctx) => {
        resolve(ctx)
      }).catch(reject)
    }

    // Continue onwards with our active domain
    return resolve(d.context.bardo)
  })
}
function assertContext ( ) { return new Promise ( function ( resolve , reject ) { // Check if we're in an active session let d = process . domain if ( d == null || d . context == null || d . context . bardo == null ) { // Begin the session before proceeding return begin ( ) . then ( ( ctx ) => { resolve ( ctx ) } ) . catch ( reject ) } // Continue onwards with our active domain return resolve ( d . context . bardo ) } ) }
Assert that we have a database context
Assert that we have a database context