Class: ActiveRecord::ConnectionAdapters::PostgreSQLTableDefinition
- Inherits:
-
TableDefinition
- Object
- TableDefinition
- ActiveRecord::ConnectionAdapters::PostgreSQLTableDefinition
- Defined in:
- lib/postgis_adapter.rb
Instance Attribute Summary collapse
-
#geom_columns ⇒ Object
readonly
Returns the value of attribute geom_columns.
Instance Method Summary collapse
Instance Attribute Details
#geom_columns ⇒ Object (readonly)
Returns the value of attribute geom_columns.
351 352 353 |
# File 'lib/postgis_adapter.rb', line 351 def geom_columns @geom_columns end |
Instance Method Details
#column(name, type, options = {}) ⇒ Object
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/postgis_adapter.rb', line 353 def column(name, type, = {}) unless (@base.geometry_data_types[type.to_sym].nil? or ([:create_using_addgeometrycolumn] == false)) geom_column = PostgreSQLColumnDefinition.new(@base,name, type) geom_column.null = [:null] geom_column.srid = [:srid] || -1 geom_column.with_z = [:with_z] || false geom_column.with_m = [:with_m] || false @geom_columns = [] if @geom_columns.nil? @geom_columns << geom_column else super(name,type,) end end |