index.js
function skipDeleted (model, attrs, options) {
    if (!options.isEager || options.parentResponse) {
      let softDelete = this.model
        ? this.model.prototype.softDelete
        : this.softDelete

      if (softDelete && !options.withDeleted) {
        if (settings.nullValue === null) {
          options.query.whereNull(`${result(this, 'tableName')}.${settings.field}`)
        } else {
          options.query.where(`${result(this, 'tableName')}.${settings.field}`, settings.nullValue)
        }
      }
    }
  }
function skipDeleted (model, attrs, options) {
    if (!options.isEager || options.parentResponse) {
      let softDelete = this.model
        ? this.model.prototype.softDelete
        : this.softDelete

      if (softDelete && !options.withDeleted) {
        if (settings.nullValue === null) {
          options.query.whereNull(`${result(this, 'tableName')}.${settings.field}`)
        } else {
          options.query.where(`${result(this, 'tableName')}.${settings.field}`, settings.nullValue)
        }
      }
    }
  }
function skipDeleted ( model , attrs , options ) { if ( ! options . isEager || options . parentResponse ) { let softDelete = this . model ? this . model . prototype . softDelete : this . softDelete if ( softDelete && ! options . withDeleted ) { if ( settings . nullValue === null ) { options . query . whereNull ( ` ${ result ( this , 'tableName' ) } ${ settings . field } ` ) } else { options . query . where ( ` ${ result ( this , 'tableName' ) } ${ settings . field } ` , settings . nullValue ) } } } }
Check if the operation needs to be patched for not retrieving
soft deleted rows
@param {Object} model An instantiated bookshelf model
@param {Object} attrs The attributes that's being queried
@param {Object} options The operation option
@param {Boolean} [options.withDeleted=false] Override the default behavior
and allow querying soft deleted objects
Check if the operation needs to be patched for not retrieving soft deleted rows