Method: Sequel::Postgres::DatabaseMethods#type_supported?
- Defined in:
- lib/sequel/adapters/shared/postgres.rb
#type_supported?(type) ⇒ Boolean
Check whether the given type name string/symbol (e.g. :hstore) is supported by the database.
537 538 539 540 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 537 def type_supported?(type) @supported_types ||= {} @supported_types.fetch(type){@supported_types[type] = (from(:pg_type).filter(:typtype=>'b', :typname=>type.to_s).count > 0)} end |