Module: ActiveRecord::ConnectionAdapters::CockroachDB::ColumnMethods

Included in:
TableDefinition
Defined in:
lib/active_record/connection_adapters/cockroachdb/column_methods.rb

Instance Method Summary collapse

Instance Method Details

#geography(name, options = {}) ⇒ Object



27
28
29
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 27

def geography(name, options = {})
  column(name, :geography, **options)
end

#geometry(name, options = {}) ⇒ Object



31
32
33
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 31

def geometry(name, options = {})
  column(name, :geometry, **options)
end

#geometry_collection(name, options = {}) ⇒ Object



35
36
37
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 35

def geometry_collection(name, options = {})
  column(name, :geometry_collection, **options)
end

#line_string(name, options = {}) ⇒ Object



39
40
41
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 39

def line_string(name, options = {})
  column(name, :line_string, **options)
end

#multi_line_string(name, options = {}) ⇒ Object



43
44
45
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 43

def multi_line_string(name, options = {})
  column(name, :multi_line_string, **options)
end

#multi_point(name, options = {}) ⇒ Object



47
48
49
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 47

def multi_point(name, options = {})
  column(name, :multi_point, **options)
end

#multi_polygon(name, options = {}) ⇒ Object



51
52
53
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 51

def multi_polygon(name, options = {})
  column(name, :multi_polygon, **options)
end

#spatial(name, options = {}) ⇒ Object



21
22
23
24
25
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 21

def spatial(name, options = {})
  raise "You must set a type. For example: 't.spatial type: :st_point'" unless options[:type]

  column(name, options[:type], **options)
end

#st_point(name, options = {}) ⇒ Object



55
56
57
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 55

def st_point(name, options = {})
  column(name, :st_point, **options)
end

#st_polygon(name, options = {}) ⇒ Object



59
60
61
# File 'lib/active_record/connection_adapters/cockroachdb/column_methods.rb', line 59

def st_polygon(name, options = {})
  column(name, :st_polygon, **options)
end