activerecord-postgis-adapter 9.0.0 → 9.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record/connection_adapters/postgis/schema_statements.rb +2 -1
- data/lib/active_record/connection_adapters/postgis/spatial_column.rb +2 -2
- data/lib/active_record/connection_adapters/postgis/version.rb +1 -1
- data/lib/active_record/connection_adapters/postgis_adapter.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75f6e9775eb5ed72bf5afd83bb6c987da46b6ac05db7ea61e8930565010b5874
|
4
|
+
data.tar.gz: f656e5b00c0920b2b8a2373de6501a048991498a6592338ca73d4a2e7d73df04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489c286442008acd662c8b8c3cbeae6351e76b65547bb5559f7697eeccf30f910b635cff3884981499abfdb7bb028a740a1ff987e85d68adb635ff3b49920c73
|
7
|
+
data.tar.gz: 0a5122a68aa81d656822b04327848350c99529eb7f811d116a9bfb9a31b90b0028fe33ad80961acbc2429a5a84e9dd704df3a081c05f495564cd250dc70d2156
|
@@ -8,7 +8,7 @@ module ActiveRecord
|
|
8
8
|
# https://github.com/rails/rails/blob/7-0-stable/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb#L662
|
9
9
|
# Create a SpatialColumn instead of a PostgreSQL::Column
|
10
10
|
def new_column_from_field(table_name, field, _definitions)
|
11
|
-
column_name, type, default, notnull, oid, fmod, collation, comment, attgenerated = field
|
11
|
+
column_name, type, default, notnull, oid, fmod, collation, comment, identity, attgenerated = field
|
12
12
|
type_metadata = fetch_type_metadata(column_name, type, oid.to_i, fmod.to_i)
|
13
13
|
default_value = extract_value_from_default(default)
|
14
14
|
|
@@ -35,6 +35,7 @@ module ActiveRecord
|
|
35
35
|
comment: comment.presence,
|
36
36
|
serial: serial,
|
37
37
|
generated: attgenerated,
|
38
|
+
identity: identity.presence,
|
38
39
|
spatial: spatial
|
39
40
|
)
|
40
41
|
end
|
@@ -9,7 +9,7 @@ module ActiveRecord # :nodoc:
|
|
9
9
|
# "Geography(Point,4326)"
|
10
10
|
def initialize(name, default, sql_type_metadata = nil, null = true,
|
11
11
|
default_function = nil, collation: nil, comment: nil,
|
12
|
-
serial: nil, generated: nil, spatial: nil)
|
12
|
+
serial: nil, generated: nil, spatial: nil, identity: nil)
|
13
13
|
@sql_type_metadata = sql_type_metadata
|
14
14
|
@geographic = !!(sql_type_metadata.sql_type =~ /geography\(/i)
|
15
15
|
if spatial
|
@@ -31,7 +31,7 @@ module ActiveRecord # :nodoc:
|
|
31
31
|
build_from_sql_type(sql_type_metadata.sql_type)
|
32
32
|
end
|
33
33
|
super(name, default, sql_type_metadata, null, default_function,
|
34
|
-
collation: collation, comment: comment, serial: serial, generated: generated)
|
34
|
+
collation: collation, comment: comment, serial: serial, generated: generated, identity: identity)
|
35
35
|
if spatial? && @srid
|
36
36
|
@limit = { srid: @srid, type: to_type_name(geometric_type) }
|
37
37
|
@limit[:has_z] = true if @has_z
|
@@ -24,6 +24,16 @@ require_relative "postgis/create_connection"
|
|
24
24
|
# :startdoc:
|
25
25
|
|
26
26
|
module ActiveRecord
|
27
|
+
module ConnectionHandling # :nodoc:
|
28
|
+
def postgis_adapter_class
|
29
|
+
ConnectionAdapters::PostGISAdapter
|
30
|
+
end
|
31
|
+
|
32
|
+
def postgis_connection(config)
|
33
|
+
postgis_adapter_class.new(config)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
27
37
|
module ConnectionAdapters
|
28
38
|
class PostGISAdapter < PostgreSQLAdapter
|
29
39
|
ADAPTER_NAME = 'PostGIS'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgis-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
158
|
+
rubygems_version: 3.3.26
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: ActiveRecord adapter for PostGIS, based on RGeo.
|