pglite 0.2.1-x86_64-linux → 0.2.2-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/3.2/pglite_rb.so +0 -0
- data/lib/3.3/pglite_rb.so +0 -0
- data/lib/3.4/pglite_rb.so +0 -0
- data/lib/4.0/pglite_rb.so +0 -0
- data/lib/active_record/connection_adapters/pglite_adapter.rb +21 -18
- data/lib/pglite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e62d91b249dfa5f8c42bdbd1ab6f23c3262a6157a0142955ae6800eb6943257f
|
|
4
|
+
data.tar.gz: d0aa66a25daf7c55b1b062f2444fb80738ae0161154e90ede5f5d5c6dce219ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d058ee68ee0641181ed7eccd7a1501cad3b70deaf7e9ad5c0b7c61fdd3b47256a23cb6ed5b5c015e319bd5e379ff0de2c81363e767eb60f327956adf186b7c4e
|
|
7
|
+
data.tar.gz: 4c19d36f6e2910d3cf269f9347d7c6aa14f0a3c0c106accd81ff1feb899bc61b3acb19870f5b834314f2f1252ae4283c33ec18717f9f3f18255804ce382cf7e2
|
data/lib/3.2/pglite_rb.so
CHANGED
|
Binary file
|
data/lib/3.3/pglite_rb.so
CHANGED
|
Binary file
|
data/lib/3.4/pglite_rb.so
CHANGED
|
Binary file
|
data/lib/4.0/pglite_rb.so
CHANGED
|
Binary file
|
|
@@ -44,6 +44,26 @@ module ActiveRecord
|
|
|
44
44
|
@prepared_statements = false
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
def configure_connection(...)
|
|
48
|
+
super
|
|
49
|
+
|
|
50
|
+
# PGlite has not col_description function used by column definition queries
|
|
51
|
+
query_command(<<~SQL
|
|
52
|
+
CREATE OR REPLACE FUNCTION col_description(table_oid oid, column_number integer)
|
|
53
|
+
RETURNS text
|
|
54
|
+
LANGUAGE sql
|
|
55
|
+
STABLE
|
|
56
|
+
AS $$
|
|
57
|
+
SELECT description
|
|
58
|
+
FROM pg_catalog.pg_description
|
|
59
|
+
WHERE objoid = table_oid
|
|
60
|
+
AND objsubid = column_number
|
|
61
|
+
AND classoid = 'pg_catalog.pg_class'::regclass;
|
|
62
|
+
$$;
|
|
63
|
+
SQL
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
47
67
|
# Stub encoders/decoders
|
|
48
68
|
def add_pg_encoders = nil
|
|
49
69
|
|
|
@@ -51,24 +71,7 @@ module ActiveRecord
|
|
|
51
71
|
|
|
52
72
|
unless method_defined?(:query_rows)
|
|
53
73
|
alias_method :query_rows, :query
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
# TODO: col_description is not supported ???
|
|
57
|
-
def column_definitions(table_name)
|
|
58
|
-
query_rows(<<~SQL, "SCHEMA")
|
|
59
|
-
SELECT a.attname, format_type(a.atttypid, a.atttypmod),
|
|
60
|
-
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
|
|
61
|
-
c.collname, '' AS comment,
|
|
62
|
-
#{supports_identity_columns? ? "attidentity" : quote("")} AS identity,
|
|
63
|
-
#{supports_virtual_columns? ? "attgenerated" : quote("")} as attgenerated
|
|
64
|
-
FROM pg_attribute a
|
|
65
|
-
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
|
|
66
|
-
LEFT JOIN pg_type t ON a.atttypid = t.oid
|
|
67
|
-
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
|
|
68
|
-
WHERE a.attrelid = #{quote(quote_table_name(table_name))}::regclass
|
|
69
|
-
AND a.attnum > 0 AND NOT a.attisdropped
|
|
70
|
-
ORDER BY a.attnum
|
|
71
|
-
SQL
|
|
74
|
+
alias_method :query_command, :exec_query
|
|
72
75
|
end
|
|
73
76
|
|
|
74
77
|
::ActiveRecord::Type.add_modifier({array: true}, PostgreSQL::OID::Array, adapter: :pglite)
|
data/lib/pglite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pglite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|