Sha256: 058d8f1f81513c7dbdaf781e1c26ffb9e596f3586ce5d417f3c295ec3e743601
Contents?: true
Size: 963 Bytes
Versions: 14
Compression:
Stored size: 963 Bytes
Contents
# -*- encoding : utf-8 -*- module ActiveRecord module ConnectionAdapters class AbstractAdapter def match _string raise "match not implemented" end def cast_types native_database_types.merge custom_cast_types end def custom_cast_types {} end end class PostgreSQLAdapter def match string "~* #{string}" end end module MysqlCommon def match string "REGEXP #{string}" end def custom_cast_types { string: { name: "char" }, integer: { name: "signed" }, text: { name: "char" }, float: { name: "decimal" }, binary: { name: "binary" } } end end class MysqlAdapter include MysqlCommon end class Mysql2Adapter include MysqlCommon end class SQLiteAdapter def match string "REGEXP #{string}" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems