module ActiveRecord::ConnectionAdapters::SQLite3::DatabaseStatements

def write_query?(sql) # :nodoc:

:nodoc:
def write_query?(sql) # :nodoc:
  !READ_QUERY.match?(sql)
rescue ArgumentError # Invalid encoding
  !READ_QUERY.match?(sql.b)
end