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.
874 875 876 877 878 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 874 def type_supported?(type) Sequel.synchronize{return @supported_types[type] if @supported_types.has_key?(type)} supported = from(:pg_type).where(:typtype=>'b', :typname=>type.to_s).count > 0 Sequel.synchronize{return @supported_types[type] = supported} end |