module PostgresExt::Postgis::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Constants

POSTGIS_DATABASE_TYPES

Public Class Methods

prepended(klass) click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb, line 6
def self.prepended(klass)
  klass::NATIVE_DATABASE_TYPES.merge! POSTGIS_DATABASE_TYPES
  klass::TableDefinition.send :prepend, TableDefinition
  klass::ColumnDefinition.send :prepend, ColumnDefinition
  klass::SchemaCreation.send :prepend, SchemaCreation
  klass::OID.send :prepend, OID
  klass.send :prepend, Quoting
end

Public Instance Methods

migration_keys() click to toggle source
Calls superclass method
# File lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb, line 28
def migration_keys
  super + [:srid, :geometry_type]
end
prepare_column_options(column, types) click to toggle source
Calls superclass method
# File lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb, line 15
def prepare_column_options(column, types)
  spec = super

  if column.type == :geometry
    if column.srid
      spec[:srid] = column.srid
      spec[:geometry_type] = column.geometry_type
    end
  end

  spec
end