pg_query 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +29 -0
- data/lib/pg_query/deparse/alter_table.rb +16 -16
- data/lib/pg_query/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a377ed9d805e4f883bf28b2c4a7e05370e207bc1
|
4
|
+
data.tar.gz: c84ec997bb2d9c677b5726af65b85c6fdc88140c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3755eaef3616e8b07e928cb6250e19564d9e6c048705cad6248829a8e6ef4caf44e4c88152d768c877bd3ad5fb80617ce51618ac3bdddaaf5c9abe87d5c28cfa
|
7
|
+
data.tar.gz: 7814641e05dc71cb12897a2a58533d3b6ee8108003a79f350653d9134a21929549e390f11ad23952b1762c5632d0380350111d2e30f69e822a14a59d31bc147f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -147,6 +147,35 @@ This gem is based on [libpg_query](https://github.com/lfittl/libpg_query),
|
|
147
147
|
which uses the latest stable PostgreSQL version, but with a patch applied
|
148
148
|
to support parsing normalized queries containing `?` replacement characters.
|
149
149
|
|
150
|
+
## Supported Ruby Versions
|
151
|
+
|
152
|
+
Currently tested and officially supported Ruby versions:
|
153
|
+
|
154
|
+
* MRI 1.9
|
155
|
+
* MRI 2.0
|
156
|
+
* MRI 2.1
|
157
|
+
* MRI 2.2
|
158
|
+
* MRI 2.3
|
159
|
+
* Rubinius 3.20
|
160
|
+
|
161
|
+
|
162
|
+
## Resources
|
163
|
+
|
164
|
+
Products, tools and libraries built on pg_query:
|
165
|
+
|
166
|
+
* [pganalyze](https://pganalyze.com/)
|
167
|
+
* [hsql](https://github.com/JackDanger/hsql)
|
168
|
+
* [sqlint](https://github.com/purcell/sqlint)
|
169
|
+
* [pghero](https://github.com/ankane/pghero)
|
170
|
+
|
171
|
+
pg_query for other languages:
|
172
|
+
|
173
|
+
* C: [libpg_query](https://github.com/lfittl/libpg_query)
|
174
|
+
* Go: [pg_query_go](https://github.com/lfittl/pg_query_go)
|
175
|
+
* Javascript: [pg-query-parser](https://github.com/zhm/pg-query-parser)
|
176
|
+
|
177
|
+
Please feel free to [open a PR](https://github.com/lfittl/pg_query/pull/new/master) to add yours! :)
|
178
|
+
|
150
179
|
|
151
180
|
## Original Author
|
152
181
|
|
@@ -20,22 +20,22 @@ class PgQuery
|
|
20
20
|
end
|
21
21
|
|
22
22
|
ALTER_TABLE_TYPES_MAPPING = {
|
23
|
-
AT_AddColumn => ->
|
24
|
-
AT_ColumnDefault => ->
|
25
|
-
AT_DropNotNull => ->
|
26
|
-
AT_SetNotNull => ->
|
27
|
-
AT_SetStatistics => ->
|
28
|
-
AT_SetOptions => ->
|
29
|
-
AT_ResetOptions => ->
|
30
|
-
AT_SetStorage => ->
|
31
|
-
AT_DropColumn => ->
|
32
|
-
AT_AddIndex => ->
|
33
|
-
AT_AddConstraint => ->
|
34
|
-
AT_AlterConstraint => ->
|
35
|
-
AT_ValidateConstraint => ->
|
36
|
-
AT_DropConstraint => ->
|
37
|
-
AT_AlterColumnType => ->
|
38
|
-
AT_AlterColumnGenericOptions => ->
|
23
|
+
AT_AddColumn => ->(_node) { ['ADD COLUMN'] },
|
24
|
+
AT_ColumnDefault => ->(node) { ['ALTER COLUMN', node['def'] ? 'SET DEFAULT' : 'DROP DEFAULT'] },
|
25
|
+
AT_DropNotNull => ->(_node) { ['ALTER COLUMN', 'DROP NOT NULL'] },
|
26
|
+
AT_SetNotNull => ->(_node) { ['ALTER COLUMN', 'SET NOT NULL'] },
|
27
|
+
AT_SetStatistics => ->(_node) { ['ALTER COLUMN', 'SET STATISTICS'] },
|
28
|
+
AT_SetOptions => ->(_node) { ['ALTER COLUMN', 'SET'] },
|
29
|
+
AT_ResetOptions => ->(_node) { ['ALTER COLUMN', 'RESET'] },
|
30
|
+
AT_SetStorage => ->(_node) { ['ALTER COLUMN', 'SET STORAGE'] },
|
31
|
+
AT_DropColumn => ->(_node) { ['DROP'] },
|
32
|
+
AT_AddIndex => ->(_node) { ['ADD INDEX'] },
|
33
|
+
AT_AddConstraint => ->(_node) { ['ADD'] },
|
34
|
+
AT_AlterConstraint => ->(_node) { ['ALTER CONSTRAINT'] },
|
35
|
+
AT_ValidateConstraint => ->(_node) { ['VALIDATE CONSTRAINT'] },
|
36
|
+
AT_DropConstraint => ->(_node) { ['DROP CONSTRAINT'] },
|
37
|
+
AT_AlterColumnType => ->(_node) { ['ALTER COLUMN', 'TYPE'] },
|
38
|
+
AT_AlterColumnGenericOptions => ->(_node) { ['ALTER COLUMN', 'OPTIONS'] }
|
39
39
|
}.freeze
|
40
40
|
end
|
41
41
|
end
|
data/lib/pg_query/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Fittl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|