tidus 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tidus/query.rb +12 -1
- data/lib/tidus/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0788d5eac4c060fa79f55b57512f970ebc1919994532fba9d5fcd0857db0bcd
|
4
|
+
data.tar.gz: a30b93c68023dda2caaef0c71ca0ea52c521a2bc2c39ca15f98b9a1e66e5300c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06a983ac2815a1178f8b53dcdb4a219fa0322f8e2de32d8af2071f57dffac1c292534de65f74f231e9705c3b3eaca12aeff69f2c642d9261c0beff74c640993f
|
7
|
+
data.tar.gz: 612b24c8414c4721af928321f9f057e5d933b2dc629a6fd16c73fa7c7544bf72ff16acc664cb0683eef2afd681e73e6d17a8960dc375bdad094918e845b9a647
|
data/lib/tidus/query.rb
CHANGED
@@ -2,8 +2,19 @@
|
|
2
2
|
|
3
3
|
module Tidus
|
4
4
|
module Query
|
5
|
+
def create_view_query_part
|
6
|
+
case connection.instance_values['config'][:adapter].to_s.downcase
|
7
|
+
when 'postgresql'
|
8
|
+
return 'CREATE OR REPLACE VIEW'
|
9
|
+
when 'sqlite3'
|
10
|
+
return 'CREATE VIEW IF NOT EXISTS'
|
11
|
+
else
|
12
|
+
return 'CREATE VIEW'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
5
16
|
def create_query
|
6
|
-
"
|
17
|
+
"#{create_view_query_part} #{view_name} AS " +
|
7
18
|
"SELECT #{view_columns.join(', ')} " +
|
8
19
|
"FROM #{table_name}"
|
9
20
|
end
|
data/lib/tidus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '3.2'
|
69
69
|
description: Creates views which allow anonymization of database tables.
|
70
70
|
email:
|
71
|
-
- tobias.schoknecht@
|
71
|
+
- tobias.schoknecht@viafintech.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -101,7 +101,7 @@ homepage: ''
|
|
101
101
|
licenses:
|
102
102
|
- MIT
|
103
103
|
metadata: {}
|
104
|
-
post_install_message:
|
104
|
+
post_install_message:
|
105
105
|
rdoc_options: []
|
106
106
|
require_paths:
|
107
107
|
- lib
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubygems_version: 3.0.6
|
120
|
-
signing_key:
|
120
|
+
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Gem for creating anonymization views.
|
123
123
|
test_files: []
|