lib/postgis_adapter.rb
# Adds a GIST spatial index to a column. Its name will be
# <table_name>_<column_name>_spatial_index unless
# the key :name is present in the options hash, in which case its
# value is taken as the name of the index.
Adds a GIST spatial index to a column. Its name will be
__spatial_index unless
the key :name is present in the options hash, in which case its
value is taken as the name of the index.
Adds a GIST spatial index to a column . Its name will be __spatial_index unless the key : name is present in the options hash in which case its value is taken as the name of the index .
def add_index(table_name, column_name, options = {})
    index_name = options[:name] || index_name(table_name,:column => Array(column_name))
    if options[:spatial]
      execute "CREATE INDEX #{index_name} ON #{table_name} USING GIST (#{Array(column_name).join(", ")} GIST_GEOMETRY_OPS)"
    else
      super
    end
  end
def add_index ( table_name , column_name , options = { } ) index_name = options [ :name ] || index_name ( table_name , :column => Array ( column_name ) ) if options [ :spatial ] execute "CREATE INDEX #{index_name} ON #{table_name} USING GIST (#{Array(column_name).join(", ")} GIST_GEOMETRY_OPS)" else super end end
Adds a GIST spatial index to a column.
Adds a GIST spatial index to a column .
table_name
<not_specific>
column_name
<not_specific>
options
<not_specific>