dateBasedWhere (type, query, where) {
    const value = SQLiteGrammar.parameter(where.value)
    return `strftime('${type}', ${this.wrap(where.column)}) ${where.operator} cast(${value} as text)`
  }