activerecord-postgis-adapter 8.0.1 → 8.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/oid/date_time.rb +20 -0
- data/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb +7 -1
- data/lib/active_record/connection_adapters/postgis/version.rb +1 -1
- data/lib/active_record/connection_adapters/postgis_adapter.rb +1 -0
- metadata +32 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a73b6c9fb325971ec1f593c4698c12b68d8e9fd96e3af64f720d842f47f6c7d0
|
4
|
+
data.tar.gz: 52e0aa909ca3a69c74bcab5d6f0af4bd43f6610192a834743c632f803e17ce3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1f926834a893d07c9e09928ffbce2635906292a8dbad8f949df978f779c06841cd36b89ab0c160f5f2f197fffeb82907e2b24f18fd2dffd34b8184f9591bdf
|
7
|
+
data.tar.gz: 7da434681d9cfa4f120b76768d0bdab74724e3eca2928df1c4897c94ee7e6b1f8b2367c4a2213831b3a8943b3ac4759fc7de2c8583f422640835fcc2563efe68
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveRecord
|
4
|
+
module ConnectionAdapters
|
5
|
+
module PostGIS
|
6
|
+
module OID
|
7
|
+
module DateTime
|
8
|
+
protected
|
9
|
+
|
10
|
+
# Uses PostGIS instead of PostgreSQLAdapter
|
11
|
+
def real_type_unless_aliased(real_type)
|
12
|
+
ActiveRecord::ConnectionAdapters::PostGISAdapter.datetime_type == real_type ? :datetime : real_type
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
PostgreSQL::OID::DateTime.prepend(DateTime)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -8,7 +8,13 @@ module ActiveRecord # :nodoc:
|
|
8
8
|
|
9
9
|
# super: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
|
10
10
|
def new_column_definition(name, type, **options)
|
11
|
-
|
11
|
+
col_type = if type.to_sym == :virtual
|
12
|
+
options[:type]
|
13
|
+
else
|
14
|
+
type
|
15
|
+
end
|
16
|
+
|
17
|
+
if (info = PostGISAdapter.spatial_column_options(col_type))
|
12
18
|
if (limit = options.delete(:limit)) && limit.is_a?(::Hash)
|
13
19
|
options.merge!(limit)
|
14
20
|
end
|
@@ -18,6 +18,7 @@ require "active_record/connection_adapters/postgis/spatial_table_definition"
|
|
18
18
|
require "active_record/connection_adapters/postgis/spatial_column"
|
19
19
|
require "active_record/connection_adapters/postgis/arel_tosql"
|
20
20
|
require "active_record/connection_adapters/postgis/oid/spatial"
|
21
|
+
require "active_record/connection_adapters/postgis/oid/date_time"
|
21
22
|
require "active_record/connection_adapters/postgis/type" # has to be after oid/*
|
22
23
|
require "active_record/connection_adapters/postgis/create_connection"
|
23
24
|
# :startdoc:
|
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: 8.0.
|
4
|
+
version: 8.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: 2023-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -81,6 +81,34 @@ dependencies:
|
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '1.1'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: benchmark-ips
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 2.9.1
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 2.9.1
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: rubocop
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '1.50'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.50'
|
84
112
|
description: ActiveRecord connection adapter for PostGIS. It is based on the stock
|
85
113
|
PostgreSQL adapter, and adds built-in support for the spatial extensions provided
|
86
114
|
by PostGIS. It uses the RGeo library to represent spatial data in Ruby.
|
@@ -97,6 +125,7 @@ files:
|
|
97
125
|
- lib/active_record/connection_adapters/postgis/column_methods.rb
|
98
126
|
- lib/active_record/connection_adapters/postgis/create_connection.rb
|
99
127
|
- lib/active_record/connection_adapters/postgis/database_statements.rb
|
128
|
+
- lib/active_record/connection_adapters/postgis/oid/date_time.rb
|
100
129
|
- lib/active_record/connection_adapters/postgis/oid/spatial.rb
|
101
130
|
- lib/active_record/connection_adapters/postgis/schema_statements.rb
|
102
131
|
- lib/active_record/connection_adapters/postgis/spatial_column.rb
|
@@ -126,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
155
|
- !ruby/object:Gem::Version
|
127
156
|
version: '0'
|
128
157
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
158
|
+
rubygems_version: 3.2.33
|
130
159
|
signing_key:
|
131
160
|
specification_version: 4
|
132
161
|
summary: ActiveRecord adapter for PostGIS, based on RGeo.
|