code: function selectByIdWhereSql () {
      // get id column
      var idColumn = this.model.columnName('id')
      // every where statement will begin with the alias and column name
      var columnSql = `${this.alias}.${this.quoteName(idColumn)}`
      // sql for where query
      var sql
      // if ids are array build in query
      if (Array.isArray(this.args.where.id)) {
          var i = 0
          // get placeholder for each in value
          var placeholders = _.map(this.args.where.id, id => {
              // get param name
              var paramName = `id${i}`
              // increment param counter
              i++
              // set value for param placeholder
              this.params[paramName] = id
              // create placeholder
              return this.unhexId(`:${paramName}`)
          })
          // return where sql
          sql = `WHERE ${columnSql} IN(${placeholders.join(', ')})`
      }
      // otherwise build equals query
      else {
          // set value for param placeholder
          this.params.id = this.args.where.id
          // get place holder
          var placeholder = this.unhexId(':id')
          // return where sql
          sql = `WHERE ${columnSql} = ${placeholder}`
      }
      // and deleted check if d column exists and set in args
      if (defined(this.model.columns.d) && typeof this.args.where.isDeleted === 'boolean') {
          sql += ` AND ${this.alias}.d = ${this.args.where.isDeleted ? 1 : 0}`
      }
  
      return sql
  }
docs: @function selectByIdWhereSql
  
  build SQL for WHERE for select by id
  
  @returns {string}