module Torque::PostgreSQL::Adapter::DatabaseStatements
Constants
- EXTENDED_DATABASE_TYPES
Public Instance Methods
configure_connection()
click to toggle source
Configure the interval format
Calls superclass method
# File lib/torque/postgresql/adapter/database_statements.rb, line 32 def configure_connection super execute("SET SESSION IntervalStyle TO 'iso_8601'", 'SCHEMA') end
dump_mode!()
click to toggle source
Switch between dump mode or not
# File lib/torque/postgresql/adapter/database_statements.rb, line 11 def dump_mode! @_dump_mode = !!!@_dump_mode end
extended_types()
click to toggle source
Get the list of extended types
# File lib/torque/postgresql/adapter/database_statements.rb, line 21 def extended_types EXTENDED_DATABASE_TYPES end
initialize_type_map(m = type_map)
click to toggle source
Change some of the types being mapped
Calls superclass method
# File lib/torque/postgresql/adapter/database_statements.rb, line 38 def initialize_type_map(m = type_map) super m.register_type 'box', OID::Box.new m.register_type 'circle', OID::Circle.new m.register_type 'interval', OID::Interval.new m.register_type 'line', OID::Line.new m.register_type 'segment', OID::Segment.new end
type_exists?(name)
click to toggle source
Returns true if type exists.
# File lib/torque/postgresql/adapter/database_statements.rb, line 26 def type_exists?(name) user_defined_types.key? name.to_s end
Also aliased as: data_type_exists?
valid_type?(type)
click to toggle source
Check if a given type is valid.
Calls superclass method
# File lib/torque/postgresql/adapter/database_statements.rb, line 16 def valid_type?(type) super || extended_types.include?(type) end