Module: Torque::PostgreSQL::Adapter

Includes:
ColumnDumper, DatabaseStatements, Quoting, SchemaStatements
Defined in:
lib/torque/postgresql/adapter.rb,
lib/torque/postgresql/adapter/oid.rb,
lib/torque/postgresql/adapter/oid/box.rb,
lib/torque/postgresql/adapter/quoting.rb,
lib/torque/postgresql/adapter/oid/enum.rb,
lib/torque/postgresql/adapter/oid/line.rb,
lib/torque/postgresql/adapter/oid/range.rb,
lib/torque/postgresql/adapter/oid/circle.rb,
lib/torque/postgresql/adapter/oid/segment.rb,
lib/torque/postgresql/adapter/oid/enum_set.rb,
lib/torque/postgresql/adapter/oid/interval.rb,
lib/torque/postgresql/adapter/schema_dumper.rb,
lib/torque/postgresql/adapter/schema_creation.rb,
lib/torque/postgresql/adapter/schema_statements.rb,
lib/torque/postgresql/adapter/schema_definitions.rb,
lib/torque/postgresql/adapter/database_statements.rb

Defined Under Namespace

Modules: ColumnDefinition, ColumnDumper, ColumnMethods, DatabaseStatements, OID, Quoting, SchemaCreation, SchemaStatements, TableDefinition

Constant Summary

Constants included from SchemaStatements

SchemaStatements::TableDefinition

Constants included from DatabaseStatements

DatabaseStatements::EXTENDED_DATABASE_TYPES

Constants included from Quoting

Quoting::Name

Instance Method Summary collapse

Methods included from SchemaStatements

#add_enum_values, #create_enum, #create_table, #drop_type, #enum_values, #rename_type

Methods included from DatabaseStatements

#column_definitions, #configure_connection, #dump_mode!, #extended_types, #extract_value_from_default, #inherited_tables, #initialize_type_map, #load_additional_types, #torque_load_additional_types, #type_exists?, #user_defined_types, #valid_type?

Methods included from ColumnDumper

#migration_keys, #prepare_column_options, #schema_type

Methods included from Quoting

#quote_default_expression, #quote_type_name

Instance Method Details

#versionObject

Get the current PostgreSQL version as a Gem Version.



18
19
20
21
22
# File 'lib/torque/postgresql/adapter.rb', line 18

def version
  @version ||= Gem::Version.new(
    select_value('SELECT version()').match(/#{Adapter::ADAPTER_NAME} ([\d\.]+)/)[1]
  )
end