Class: ActiveRecordMysqlSpatial::ActiveRecord::MySQL::Base
- Inherits:
-
ActiveRecord::Type::Json
- Object
- ActiveRecord::Type::Json
- ActiveRecordMysqlSpatial::ActiveRecord::MySQL::Base
show all
- Defined in:
- lib/active_record_mysql_spatial/active_record/mysql/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
7
8
9
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 7
def error
@error
end
|
#error_backtrace ⇒ Object
Returns the value of attribute error_backtrace.
7
8
9
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 7
def error_backtrace
@error_backtrace
end
|
#raw ⇒ Object
Returns the value of attribute raw.
7
8
9
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 7
def raw
@raw
end
|
Instance Method Details
#==(other) ⇒ Object
39
40
41
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 39
def ==(other)
self.class == other.class
end
|
#deserialize(value) ⇒ Object
15
16
17
18
19
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 15
def deserialize(value)
return value if value.is_a?(self.class)
cast_value(value)
end
|
#serialize(value) ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 21
def serialize(value)
if value.is_a?(self.class)
value
else
return unless valid_hash?(value)
cast_value(value)
end
end
|
#to_coordinates_sql ⇒ Object
35
36
37
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 35
def to_coordinates_sql
raise NotImplementedError
end
|
#to_sql ⇒ Object
31
32
33
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 31
def to_sql
raise NotImplementedError
end
|
#type ⇒ Object
11
12
13
|
# File 'lib/active_record_mysql_spatial/active_record/mysql/base.rb', line 11
def type
raise NotImplementedError
end
|