tablature 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tablature/adapters/postgres/partitioned_tables.rb +8 -1
- data/lib/tablature/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaec79244b29bb6514402673f8cb56f281c9cf25fb73c9a4dab413520e96b652
|
4
|
+
data.tar.gz: 54cfe803f7387135d1334dba6b4b16a0c7d1946adb6c88e092889fe881203511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f30ffd3c9b8b14b08447b222a2bc5202042ef37f2c530beda33ed651c47ea7095f536bec494eef5767c44ba7a9b9751578bd9e3ff497e53203ac9bba477fc8a2
|
7
|
+
data.tar.gz: 2553bb52f8fecfa642cf2b8c1f3908bcabf01c3a9c6e5902076e7d447e6cf64c8bd13069902d95cc7e4478daff7a08b1d899128b74722687ad5a0dcf6e0962a0
|
data/Gemfile.lock
CHANGED
@@ -48,12 +48,19 @@ module Tablature
|
|
48
48
|
def to_tablature_table(table_name, rows)
|
49
49
|
result = rows.first
|
50
50
|
partioning_method = METHOD_MAP.fetch(result['type'])
|
51
|
-
partitions = rows.map { |row| row['partition_name'] }.compact
|
51
|
+
partitions = rows.map { |row| row['partition_name'] }.compact.map(&method(:unquote))
|
52
52
|
|
53
53
|
Tablature::PartitionedTable.new(
|
54
54
|
name: table_name, partioning_method: partioning_method, partitions: partitions
|
55
55
|
)
|
56
56
|
end
|
57
|
+
|
58
|
+
# Taken from Rails's codebase.
|
59
|
+
def unquote(part)
|
60
|
+
return part if part.blank?
|
61
|
+
|
62
|
+
part.start_with?('"') ? part[1..-2] : part
|
63
|
+
end
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
data/lib/tablature/version.rb
CHANGED