Sha256: ad9c68cb13c950edb90d8e744e5d78c42597dfc74145d5d43cbe520a807b7a59
Contents?: true
Size: 610 Bytes
Versions: 13
Compression:
Stored size: 610 Bytes
Contents
module Rasti module DB module TypeConverters module PostgresTypes class Array class << self def column_type_regex /^([a-z]+)\[\]$/ end def to_db(value, sub_type) array = sub_type == 'hstore' ? value.map { |v| Sequel.hstore v } : value Sequel.pg_array array, sub_type end def db_classes [Sequel::Postgres::PGArray] end def from_db(object) object.to_a end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems