module PostgresExt::Postgis::Arel::Visitors::PostgreSQL

Private Instance Methods

visit_Arel_Nodes_Contains(o, a = nil) click to toggle source
Calls superclass method
# File lib/postgres_ext/postgis/arel/visitors/postgresql.rb, line 4
def visit_Arel_Nodes_Contains(o, a = nil)
  left_column = o.left.relation.engine.columns.find { |col| col.name == o.left.name.to_s }

  if left_column.type == :geometry
    "ST_CONTAINS(#{visit o.left, a}, #{visit o.right, o.left})"
  else
    super
  end
end
visit_RGeo_Feature_Instance(node, attribute = nil) click to toggle source
# File lib/postgres_ext/postgis/arel/visitors/postgresql.rb, line 14
def visit_RGeo_Feature_Instance(node, attribute = nil)
  quote(node, column_for(attribute))
end