baza 0.0.38 → 0.0.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -14
- data/lib/baza/database.rb +1 -1
- data/lib/baza/db.rb +5 -4
- data/lib/baza/driver/active_record/columns.rb +2 -2
- data/lib/baza/driver/active_record/commands.rb +2 -2
- data/lib/baza/driver/active_record/databases.rb +2 -2
- data/lib/baza/driver/active_record/foreign_keys.rb +13 -0
- data/lib/baza/driver/active_record/indexes.rb +2 -2
- data/lib/baza/driver/active_record/tables.rb +3 -3
- data/lib/baza/driver/active_record/users.rb +2 -2
- data/lib/baza/driver/active_record.rb +3 -1
- data/lib/baza/driver/mysql/columns.rb +1 -1
- data/lib/baza/driver/mysql/database.rb +11 -38
- data/lib/baza/driver/mysql/foreign_key.rb +2 -0
- data/lib/baza/driver/mysql/foreign_keys.rb +13 -0
- data/lib/baza/driver/mysql/sql/column.rb +3 -2
- data/lib/baza/driver/mysql/sql/create_table.rb +11 -0
- data/lib/baza/driver/mysql/table.rb +43 -4
- data/lib/baza/driver/mysql/tables.rb +22 -9
- data/lib/baza/driver/mysql2/foreign_keys.rb +2 -0
- data/lib/baza/driver/mysql2.rb +6 -5
- data/lib/baza/driver/mysql_java.rb +2 -2
- data/lib/baza/driver/pg/columns.rb +1 -1
- data/lib/baza/driver/pg/create_index_sql_creator.rb +2 -5
- data/lib/baza/driver/pg/database.rb +2 -2
- data/lib/baza/driver/pg/foreign_key.rb +2 -0
- data/lib/baza/driver/pg/foreign_keys.rb +13 -0
- data/lib/baza/driver/pg/result.rb +5 -1
- data/lib/baza/driver/pg/table.rb +43 -0
- data/lib/baza/driver/pg/tables.rb +20 -13
- data/lib/baza/driver/sqlite3/columns.rb +1 -1
- data/lib/baza/driver/sqlite3/foreign_key.rb +14 -0
- data/lib/baza/driver/sqlite3/foreign_keys.rb +11 -0
- data/lib/baza/driver/sqlite3/table.rb +41 -6
- data/lib/baza/driver/sqlite3/tables.rb +15 -14
- data/lib/baza/driver/sqlite3.rb +1 -1
- data/lib/baza/driver/sqlite3_java.rb +1 -1
- data/lib/baza/driver/sqlite3_rhodes.rb +1 -1
- data/lib/baza/dump.rb +3 -2
- data/lib/baza/foreign_key.rb +1 -1
- data/lib/baza/jdbc_driver.rb +1 -1
- data/lib/baza/mysql_base_driver.rb +1 -1
- data/lib/baza/query_buffer.rb +36 -6
- data/lib/baza/result_base.rb +2 -5
- data/lib/baza/tables.rb +1 -1
- metadata +26 -269
- data/.document +0 -5
- data/.github/dependabot.yml +0 -13
- data/.rspec +0 -1
- data/.rubocop.yml +0 -84
- data/.rubocop_todo.yml +0 -39
- data/.ruby-version +0 -1
- data/Gemfile +0 -32
- data/Gemfile.lock +0 -164
- data/VERSION +0 -1
- data/baza.gemspec +0 -264
- data/config/best_project_practice_rubocop.yml +0 -10
- data/config/best_project_practice_rubocop_todo.yml +0 -163
- data/peak_flow.yml +0 -31
- data/spec/active_record/models/user.rb +0 -3
- data/spec/baza/cloner_spec.rb +0 -10
- data/spec/baza/sql_queries/generic_insert_spec.rb +0 -26
- data/spec/baza/sql_queries/select_spec.rb +0 -38
- data/spec/drivers/active_record_mysql2_spec.rb +0 -22
- data/spec/drivers/active_record_mysql_spec.rb +0 -19
- data/spec/drivers/active_record_pg_spec.rb +0 -22
- data/spec/drivers/active_record_sqlite3_spec.rb +0 -18
- data/spec/drivers/mysql2_spec.rb +0 -19
- data/spec/drivers/mysql_spec.rb +0 -58
- data/spec/drivers/pg/columns_spec.rb +0 -45
- data/spec/drivers/pg/table_spec.rb +0 -20
- data/spec/drivers/pg_spec.rb +0 -20
- data/spec/drivers/sqlite3_spec.rb +0 -67
- data/spec/drivers/tiny_spec.rb +0 -27
- data/spec/info_active_record_example.rb +0 -35
- data/spec/info_active_record_mysql2_example.rb +0 -36
- data/spec/info_active_record_mysql2_peak_flow.rb +0 -36
- data/spec/info_active_record_mysql_example.rb +0 -37
- data/spec/info_active_record_mysql_peak_flow.rb +0 -37
- data/spec/info_active_record_pg_example.rb +0 -36
- data/spec/info_active_record_pg_peak_flow.rb +0 -36
- data/spec/info_active_record_sqlite3.rb +0 -29
- data/spec/info_mysql2_example.rb +0 -21
- data/spec/info_mysql2_peak_flow.rb +0 -21
- data/spec/info_mysql_example.rb +0 -21
- data/spec/info_mysql_peak_flow.rb +0 -21
- data/spec/info_pg_example.rb +0 -22
- data/spec/info_pg_peak_flow.rb +0 -22
- data/spec/info_sqlite3.rb +0 -19
- data/spec/spec_helper.rb +0 -18
- data/spec/support/driver_active_record_collection.rb +0 -62
- data/spec/support/driver_collection.rb +0 -396
- data/spec/support/driver_columns_collection.rb +0 -64
- data/spec/support/driver_databases_collection.rb +0 -48
- data/spec/support/driver_foreign_keys_collection.rb +0 -54
- data/spec/support/driver_importer_collection.rb +0 -38
- data/spec/support/driver_indexes_collection.rb +0 -66
- data/spec/support/driver_tables_collection.rb +0 -116
- data/spec/support/driver_users_collection.rb +0 -53
data/Gemfile.lock
DELETED
@@ -1,164 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activemodel (6.1.4.1)
|
5
|
-
activesupport (= 6.1.4.1)
|
6
|
-
activerecord (6.1.4.1)
|
7
|
-
activemodel (= 6.1.4.1)
|
8
|
-
activesupport (= 6.1.4.1)
|
9
|
-
activerecord-jdbc-adapter (61.1-java)
|
10
|
-
activerecord (~> 6.1.0)
|
11
|
-
activesupport (6.1.4.1)
|
12
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>= 1.6, < 2)
|
14
|
-
minitest (>= 5.1)
|
15
|
-
tzinfo (~> 2.0)
|
16
|
-
zeitwerk (~> 2.3)
|
17
|
-
addressable (2.4.0)
|
18
|
-
array_enumerator (0.0.10)
|
19
|
-
ast (2.4.0)
|
20
|
-
auto_autoloader (0.0.5)
|
21
|
-
string-cases
|
22
|
-
best_practice_project (0.0.9)
|
23
|
-
auto_autoloader
|
24
|
-
builder (3.2.3)
|
25
|
-
coderay (1.1.3)
|
26
|
-
concurrent-ruby (1.1.9)
|
27
|
-
datet (0.0.25)
|
28
|
-
descendants_tracker (0.0.4)
|
29
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
30
|
-
diff-lcs (1.3)
|
31
|
-
event_handler (0.0.0)
|
32
|
-
faraday (0.9.2)
|
33
|
-
multipart-post (>= 1.2, < 3)
|
34
|
-
ffi (1.15.0-java)
|
35
|
-
git (1.3.0)
|
36
|
-
github_api (0.16.0)
|
37
|
-
addressable (~> 2.4.0)
|
38
|
-
descendants_tracker (~> 0.0.4)
|
39
|
-
faraday (~> 0.8, < 0.10)
|
40
|
-
hashie (>= 3.4)
|
41
|
-
mime-types (>= 1.16, < 3.0)
|
42
|
-
oauth2 (~> 1.0)
|
43
|
-
hashie (3.5.7)
|
44
|
-
highline (1.7.10)
|
45
|
-
i18n (1.8.10)
|
46
|
-
concurrent-ruby (~> 1.0)
|
47
|
-
jar-dependencies (0.3.12)
|
48
|
-
jdbc-mysql (8.0.17)
|
49
|
-
jdbc-sqlite3 (3.28.0)
|
50
|
-
jeweler (2.3.9)
|
51
|
-
builder
|
52
|
-
bundler
|
53
|
-
git (>= 1.2.5)
|
54
|
-
github_api (~> 0.16.0)
|
55
|
-
highline (>= 1.6.15)
|
56
|
-
nokogiri (>= 1.5.10)
|
57
|
-
psych
|
58
|
-
rake
|
59
|
-
rdoc
|
60
|
-
semver2
|
61
|
-
jwt (1.5.6)
|
62
|
-
method_source (1.0.0)
|
63
|
-
mime-types (2.99.3)
|
64
|
-
mini_portile2 (2.6.1)
|
65
|
-
minitest (5.14.4)
|
66
|
-
multi_json (1.13.1)
|
67
|
-
multi_xml (0.6.0)
|
68
|
-
multipart-post (2.0.0)
|
69
|
-
mysql2 (0.4.10)
|
70
|
-
nokogiri (1.12.5)
|
71
|
-
mini_portile2 (~> 2.6.1)
|
72
|
-
racc (~> 1.4)
|
73
|
-
nokogiri (1.12.5-java)
|
74
|
-
racc (~> 1.4)
|
75
|
-
oauth2 (1.4.0)
|
76
|
-
faraday (>= 0.8, < 0.13)
|
77
|
-
jwt (~> 1.0)
|
78
|
-
multi_json (~> 1.3)
|
79
|
-
multi_xml (~> 0.5)
|
80
|
-
rack (>= 1.2, < 3)
|
81
|
-
parser (2.5.0.5)
|
82
|
-
ast (~> 2.4.0)
|
83
|
-
pg (0.21.0)
|
84
|
-
powerpack (0.1.1)
|
85
|
-
pry (0.14.1)
|
86
|
-
coderay (~> 1.1)
|
87
|
-
method_source (~> 1.0)
|
88
|
-
pry (0.14.1-java)
|
89
|
-
coderay (~> 1.1)
|
90
|
-
method_source (~> 1.0)
|
91
|
-
spoon (~> 0.0)
|
92
|
-
psych (3.0.2)
|
93
|
-
psych (3.0.2-java)
|
94
|
-
jar-dependencies (>= 0.1.7)
|
95
|
-
racc (1.5.2)
|
96
|
-
racc (1.5.2-java)
|
97
|
-
rack (2.2.3)
|
98
|
-
rainbow (2.2.2)
|
99
|
-
rake
|
100
|
-
rake (13.0.1)
|
101
|
-
rdoc (6.3.2)
|
102
|
-
rspec (3.4.0)
|
103
|
-
rspec-core (~> 3.4.0)
|
104
|
-
rspec-expectations (~> 3.4.0)
|
105
|
-
rspec-mocks (~> 3.4.0)
|
106
|
-
rspec-core (3.4.4)
|
107
|
-
rspec-support (~> 3.4.0)
|
108
|
-
rspec-expectations (3.4.0)
|
109
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
110
|
-
rspec-support (~> 3.4.0)
|
111
|
-
rspec-mocks (3.4.1)
|
112
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
113
|
-
rspec-support (~> 3.4.0)
|
114
|
-
rspec-support (3.4.1)
|
115
|
-
rubocop (0.39.0)
|
116
|
-
parser (>= 2.3.0.7, < 3.0)
|
117
|
-
powerpack (~> 0.1)
|
118
|
-
rainbow (>= 1.99.1, < 3.0)
|
119
|
-
ruby-progressbar (~> 1.7)
|
120
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
121
|
-
ruby-progressbar (1.9.0)
|
122
|
-
semver2 (3.4.2)
|
123
|
-
simple_delegate (0.0.2)
|
124
|
-
spoon (0.0.6)
|
125
|
-
ffi
|
126
|
-
sqlite3 (1.4.2)
|
127
|
-
string-cases (0.0.4)
|
128
|
-
thread_safe (0.3.6)
|
129
|
-
thread_safe (0.3.6-java)
|
130
|
-
tzinfo (2.0.4)
|
131
|
-
concurrent-ruby (~> 1.0)
|
132
|
-
unicode-display_width (1.3.0)
|
133
|
-
wref (0.0.8)
|
134
|
-
zeitwerk (2.4.2)
|
135
|
-
|
136
|
-
PLATFORMS
|
137
|
-
java
|
138
|
-
ruby
|
139
|
-
|
140
|
-
DEPENDENCIES
|
141
|
-
activerecord
|
142
|
-
activerecord-jdbc-adapter
|
143
|
-
array_enumerator (~> 0.0.10)
|
144
|
-
auto_autoloader (~> 0.0.5)
|
145
|
-
best_practice_project (= 0.0.9)
|
146
|
-
bundler
|
147
|
-
datet (~> 0.0.25)
|
148
|
-
event_handler (~> 0.0.0)
|
149
|
-
jdbc-mysql
|
150
|
-
jdbc-sqlite3
|
151
|
-
jeweler (= 2.3.9)
|
152
|
-
mysql2 (= 0.4.10)
|
153
|
-
pg (= 0.21.0)
|
154
|
-
pry
|
155
|
-
rdoc
|
156
|
-
rspec (= 3.4.0)
|
157
|
-
rubocop (= 0.39.0)
|
158
|
-
simple_delegate (~> 0.0.2)
|
159
|
-
sqlite3 (< 1.5)
|
160
|
-
string-cases (~> 0.0.4)
|
161
|
-
wref (~> 0.0.8)
|
162
|
-
|
163
|
-
BUNDLED WITH
|
164
|
-
2.2.28
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.38
|
data/baza.gemspec
DELETED
@@ -1,264 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: baza 0.0.38 ruby lib
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = "baza".freeze
|
9
|
-
s.version = "0.0.38"
|
10
|
-
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib".freeze]
|
13
|
-
s.authors = ["Kasper Johansen".freeze]
|
14
|
-
s.date = "2021-10-04"
|
15
|
-
s.description = "A database abstraction layer, model framework and database framework.".freeze
|
16
|
-
s.email = "kj@gfish.com".freeze
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE.txt",
|
19
|
-
"README.md"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".document",
|
23
|
-
".github/dependabot.yml",
|
24
|
-
".rspec",
|
25
|
-
".rubocop.yml",
|
26
|
-
".rubocop_todo.yml",
|
27
|
-
".ruby-version",
|
28
|
-
"Gemfile",
|
29
|
-
"Gemfile.lock",
|
30
|
-
"LICENSE.txt",
|
31
|
-
"README.md",
|
32
|
-
"Rakefile",
|
33
|
-
"VERSION",
|
34
|
-
"baza.gemspec",
|
35
|
-
"config/best_project_practice_rubocop.yml",
|
36
|
-
"config/best_project_practice_rubocop_todo.yml",
|
37
|
-
"lib/baza.rb",
|
38
|
-
"lib/baza/base_sql_driver.rb",
|
39
|
-
"lib/baza/cloner.rb",
|
40
|
-
"lib/baza/column.rb",
|
41
|
-
"lib/baza/commands.rb",
|
42
|
-
"lib/baza/commands/importer.rb",
|
43
|
-
"lib/baza/commands/select.rb",
|
44
|
-
"lib/baza/database.rb",
|
45
|
-
"lib/baza/database_model.rb",
|
46
|
-
"lib/baza/database_model_functionality.rb",
|
47
|
-
"lib/baza/database_model_name.rb",
|
48
|
-
"lib/baza/db.rb",
|
49
|
-
"lib/baza/dbtime.rb",
|
50
|
-
"lib/baza/driver.rb",
|
51
|
-
"lib/baza/driver/active_record.rb",
|
52
|
-
"lib/baza/driver/active_record/columns.rb",
|
53
|
-
"lib/baza/driver/active_record/commands.rb",
|
54
|
-
"lib/baza/driver/active_record/databases.rb",
|
55
|
-
"lib/baza/driver/active_record/indexes.rb",
|
56
|
-
"lib/baza/driver/active_record/result.rb",
|
57
|
-
"lib/baza/driver/active_record/tables.rb",
|
58
|
-
"lib/baza/driver/active_record/users.rb",
|
59
|
-
"lib/baza/driver/mysql.rb",
|
60
|
-
"lib/baza/driver/mysql/column.rb",
|
61
|
-
"lib/baza/driver/mysql/columns.rb",
|
62
|
-
"lib/baza/driver/mysql/commands.rb",
|
63
|
-
"lib/baza/driver/mysql/database.rb",
|
64
|
-
"lib/baza/driver/mysql/databases.rb",
|
65
|
-
"lib/baza/driver/mysql/foreign_key.rb",
|
66
|
-
"lib/baza/driver/mysql/index.rb",
|
67
|
-
"lib/baza/driver/mysql/indexes.rb",
|
68
|
-
"lib/baza/driver/mysql/result.rb",
|
69
|
-
"lib/baza/driver/mysql/sql.rb",
|
70
|
-
"lib/baza/driver/mysql/sql/column.rb",
|
71
|
-
"lib/baza/driver/mysql/sql/create_indexes.rb",
|
72
|
-
"lib/baza/driver/mysql/sql/create_table.rb",
|
73
|
-
"lib/baza/driver/mysql/sqlspecs.rb",
|
74
|
-
"lib/baza/driver/mysql/table.rb",
|
75
|
-
"lib/baza/driver/mysql/tables.rb",
|
76
|
-
"lib/baza/driver/mysql/unbuffered_result.rb",
|
77
|
-
"lib/baza/driver/mysql/user.rb",
|
78
|
-
"lib/baza/driver/mysql/users.rb",
|
79
|
-
"lib/baza/driver/mysql2.rb",
|
80
|
-
"lib/baza/driver/mysql2/column.rb",
|
81
|
-
"lib/baza/driver/mysql2/columns.rb",
|
82
|
-
"lib/baza/driver/mysql2/commands.rb",
|
83
|
-
"lib/baza/driver/mysql2/database.rb",
|
84
|
-
"lib/baza/driver/mysql2/databases.rb",
|
85
|
-
"lib/baza/driver/mysql2/index.rb",
|
86
|
-
"lib/baza/driver/mysql2/indexes.rb",
|
87
|
-
"lib/baza/driver/mysql2/result.rb",
|
88
|
-
"lib/baza/driver/mysql2/table.rb",
|
89
|
-
"lib/baza/driver/mysql2/tables.rb",
|
90
|
-
"lib/baza/driver/mysql2/user.rb",
|
91
|
-
"lib/baza/driver/mysql2/users.rb",
|
92
|
-
"lib/baza/driver/mysql_java.rb",
|
93
|
-
"lib/baza/driver/mysql_java/column.rb",
|
94
|
-
"lib/baza/driver/mysql_java/columns.rb",
|
95
|
-
"lib/baza/driver/mysql_java/commands.rb",
|
96
|
-
"lib/baza/driver/mysql_java/database.rb",
|
97
|
-
"lib/baza/driver/mysql_java/databases.rb",
|
98
|
-
"lib/baza/driver/mysql_java/index.rb",
|
99
|
-
"lib/baza/driver/mysql_java/indexes.rb",
|
100
|
-
"lib/baza/driver/mysql_java/table.rb",
|
101
|
-
"lib/baza/driver/mysql_java/tables.rb",
|
102
|
-
"lib/baza/driver/mysql_java/user.rb",
|
103
|
-
"lib/baza/driver/mysql_java/users.rb",
|
104
|
-
"lib/baza/driver/pg.rb",
|
105
|
-
"lib/baza/driver/pg/column.rb",
|
106
|
-
"lib/baza/driver/pg/columns.rb",
|
107
|
-
"lib/baza/driver/pg/commands.rb",
|
108
|
-
"lib/baza/driver/pg/create_index_sql_creator.rb",
|
109
|
-
"lib/baza/driver/pg/database.rb",
|
110
|
-
"lib/baza/driver/pg/databases.rb",
|
111
|
-
"lib/baza/driver/pg/foreign_key.rb",
|
112
|
-
"lib/baza/driver/pg/index.rb",
|
113
|
-
"lib/baza/driver/pg/indexes.rb",
|
114
|
-
"lib/baza/driver/pg/result.rb",
|
115
|
-
"lib/baza/driver/pg/table.rb",
|
116
|
-
"lib/baza/driver/pg/tables.rb",
|
117
|
-
"lib/baza/driver/sqlite3.rb",
|
118
|
-
"lib/baza/driver/sqlite3/column.rb",
|
119
|
-
"lib/baza/driver/sqlite3/columns.rb",
|
120
|
-
"lib/baza/driver/sqlite3/commands.rb",
|
121
|
-
"lib/baza/driver/sqlite3/database.rb",
|
122
|
-
"lib/baza/driver/sqlite3/databases.rb",
|
123
|
-
"lib/baza/driver/sqlite3/index.rb",
|
124
|
-
"lib/baza/driver/sqlite3/indexes.rb",
|
125
|
-
"lib/baza/driver/sqlite3/result.rb",
|
126
|
-
"lib/baza/driver/sqlite3/sqlspecs.rb",
|
127
|
-
"lib/baza/driver/sqlite3/table.rb",
|
128
|
-
"lib/baza/driver/sqlite3/tables.rb",
|
129
|
-
"lib/baza/driver/sqlite3/unbuffered_result.rb",
|
130
|
-
"lib/baza/driver/sqlite3_java.rb",
|
131
|
-
"lib/baza/driver/sqlite3_java/column.rb",
|
132
|
-
"lib/baza/driver/sqlite3_java/columns.rb",
|
133
|
-
"lib/baza/driver/sqlite3_java/commands.rb",
|
134
|
-
"lib/baza/driver/sqlite3_java/database.rb",
|
135
|
-
"lib/baza/driver/sqlite3_java/index.rb",
|
136
|
-
"lib/baza/driver/sqlite3_java/indexes.rb",
|
137
|
-
"lib/baza/driver/sqlite3_java/table.rb",
|
138
|
-
"lib/baza/driver/sqlite3_java/tables.rb",
|
139
|
-
"lib/baza/driver/sqlite3_java/unbuffered_result.rb",
|
140
|
-
"lib/baza/driver/sqlite3_rhodes.rb",
|
141
|
-
"lib/baza/driver/tiny.rb",
|
142
|
-
"lib/baza/driver/tiny/commands.rb",
|
143
|
-
"lib/baza/driver/tiny/result.rb",
|
144
|
-
"lib/baza/dump.rb",
|
145
|
-
"lib/baza/errors.rb",
|
146
|
-
"lib/baza/foreign_key.rb",
|
147
|
-
"lib/baza/idquery.rb",
|
148
|
-
"lib/baza/index.rb",
|
149
|
-
"lib/baza/jdbc_driver.rb",
|
150
|
-
"lib/baza/jdbc_result.rb",
|
151
|
-
"lib/baza/mysql_base_driver.rb",
|
152
|
-
"lib/baza/query_buffer.rb",
|
153
|
-
"lib/baza/result_base.rb",
|
154
|
-
"lib/baza/row.rb",
|
155
|
-
"lib/baza/sql_queries.rb",
|
156
|
-
"lib/baza/sql_queries/generic_insert.rb",
|
157
|
-
"lib/baza/sql_queries/generic_update.rb",
|
158
|
-
"lib/baza/sql_queries/mysql_upsert.rb",
|
159
|
-
"lib/baza/sql_queries/mysql_upsert_duplicate_key.rb",
|
160
|
-
"lib/baza/sql_queries/non_atomic_upsert.rb",
|
161
|
-
"lib/baza/sql_queries/postgres_upsert_duplicate_key.rb",
|
162
|
-
"lib/baza/sql_queries/select.rb",
|
163
|
-
"lib/baza/sql_queries/sqlite_upsert_duplicate_key.rb",
|
164
|
-
"lib/baza/sqlspecs.rb",
|
165
|
-
"lib/baza/table.rb",
|
166
|
-
"lib/baza/tables.rb",
|
167
|
-
"peak_flow.yml",
|
168
|
-
"spec/active_record/models/user.rb",
|
169
|
-
"spec/baza/cloner_spec.rb",
|
170
|
-
"spec/baza/sql_queries/generic_insert_spec.rb",
|
171
|
-
"spec/baza/sql_queries/select_spec.rb",
|
172
|
-
"spec/drivers/active_record_mysql2_spec.rb",
|
173
|
-
"spec/drivers/active_record_mysql_spec.rb",
|
174
|
-
"spec/drivers/active_record_pg_spec.rb",
|
175
|
-
"spec/drivers/active_record_sqlite3_spec.rb",
|
176
|
-
"spec/drivers/mysql2_spec.rb",
|
177
|
-
"spec/drivers/mysql_spec.rb",
|
178
|
-
"spec/drivers/pg/columns_spec.rb",
|
179
|
-
"spec/drivers/pg/table_spec.rb",
|
180
|
-
"spec/drivers/pg_spec.rb",
|
181
|
-
"spec/drivers/sqlite3_spec.rb",
|
182
|
-
"spec/drivers/tiny_spec.rb",
|
183
|
-
"spec/info_active_record_example.rb",
|
184
|
-
"spec/info_active_record_mysql2_example.rb",
|
185
|
-
"spec/info_active_record_mysql2_peak_flow.rb",
|
186
|
-
"spec/info_active_record_mysql_example.rb",
|
187
|
-
"spec/info_active_record_mysql_peak_flow.rb",
|
188
|
-
"spec/info_active_record_pg_example.rb",
|
189
|
-
"spec/info_active_record_pg_peak_flow.rb",
|
190
|
-
"spec/info_active_record_sqlite3.rb",
|
191
|
-
"spec/info_mysql2_example.rb",
|
192
|
-
"spec/info_mysql2_peak_flow.rb",
|
193
|
-
"spec/info_mysql_example.rb",
|
194
|
-
"spec/info_mysql_peak_flow.rb",
|
195
|
-
"spec/info_pg_example.rb",
|
196
|
-
"spec/info_pg_peak_flow.rb",
|
197
|
-
"spec/info_sqlite3.rb",
|
198
|
-
"spec/spec_helper.rb",
|
199
|
-
"spec/support/driver_active_record_collection.rb",
|
200
|
-
"spec/support/driver_collection.rb",
|
201
|
-
"spec/support/driver_columns_collection.rb",
|
202
|
-
"spec/support/driver_databases_collection.rb",
|
203
|
-
"spec/support/driver_foreign_keys_collection.rb",
|
204
|
-
"spec/support/driver_importer_collection.rb",
|
205
|
-
"spec/support/driver_indexes_collection.rb",
|
206
|
-
"spec/support/driver_tables_collection.rb",
|
207
|
-
"spec/support/driver_users_collection.rb"
|
208
|
-
]
|
209
|
-
s.homepage = "http://github.com/kaspernj/baza".freeze
|
210
|
-
s.licenses = ["MIT".freeze]
|
211
|
-
s.rubygems_version = "3.1.6".freeze
|
212
|
-
s.summary = "A database abstraction layer, model framework and database framework.".freeze
|
213
|
-
|
214
|
-
if s.respond_to? :specification_version then
|
215
|
-
s.specification_version = 4
|
216
|
-
end
|
217
|
-
|
218
|
-
if s.respond_to? :add_runtime_dependency then
|
219
|
-
s.add_runtime_dependency(%q<array_enumerator>.freeze, ["~> 0.0.10"])
|
220
|
-
s.add_runtime_dependency(%q<auto_autoloader>.freeze, ["~> 0.0.5"])
|
221
|
-
s.add_runtime_dependency(%q<datet>.freeze, ["~> 0.0.25"])
|
222
|
-
s.add_runtime_dependency(%q<event_handler>.freeze, ["~> 0.0.0"])
|
223
|
-
s.add_runtime_dependency(%q<simple_delegate>.freeze, ["~> 0.0.2"])
|
224
|
-
s.add_runtime_dependency(%q<string-cases>.freeze, ["~> 0.0.4"])
|
225
|
-
s.add_runtime_dependency(%q<wref>.freeze, ["~> 0.0.8"])
|
226
|
-
s.add_development_dependency(%q<activerecord>.freeze, [">= 0"])
|
227
|
-
s.add_development_dependency(%q<activerecord-jdbc-adapter>.freeze, [">= 0"])
|
228
|
-
s.add_development_dependency(%q<best_practice_project>.freeze, ["= 0.0.9"])
|
229
|
-
s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
|
230
|
-
s.add_development_dependency(%q<jdbc-mysql>.freeze, [">= 0"])
|
231
|
-
s.add_development_dependency(%q<jdbc-sqlite3>.freeze, [">= 0"])
|
232
|
-
s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
233
|
-
s.add_development_dependency(%q<mysql2>.freeze, ["= 0.4.10"])
|
234
|
-
s.add_development_dependency(%q<pg>.freeze, ["= 0.21.0"])
|
235
|
-
s.add_development_dependency(%q<pry>.freeze, [">= 0"])
|
236
|
-
s.add_development_dependency(%q<rdoc>.freeze, [">= 0"])
|
237
|
-
s.add_development_dependency(%q<rspec>.freeze, ["= 3.4.0"])
|
238
|
-
s.add_development_dependency(%q<rubocop>.freeze, ["= 0.39.0"])
|
239
|
-
s.add_development_dependency(%q<sqlite3>.freeze, ["< 1.5"])
|
240
|
-
else
|
241
|
-
s.add_dependency(%q<array_enumerator>.freeze, ["~> 0.0.10"])
|
242
|
-
s.add_dependency(%q<auto_autoloader>.freeze, ["~> 0.0.5"])
|
243
|
-
s.add_dependency(%q<datet>.freeze, ["~> 0.0.25"])
|
244
|
-
s.add_dependency(%q<event_handler>.freeze, ["~> 0.0.0"])
|
245
|
-
s.add_dependency(%q<simple_delegate>.freeze, ["~> 0.0.2"])
|
246
|
-
s.add_dependency(%q<string-cases>.freeze, ["~> 0.0.4"])
|
247
|
-
s.add_dependency(%q<wref>.freeze, ["~> 0.0.8"])
|
248
|
-
s.add_dependency(%q<activerecord>.freeze, [">= 0"])
|
249
|
-
s.add_dependency(%q<activerecord-jdbc-adapter>.freeze, [">= 0"])
|
250
|
-
s.add_dependency(%q<best_practice_project>.freeze, ["= 0.0.9"])
|
251
|
-
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
252
|
-
s.add_dependency(%q<jdbc-mysql>.freeze, [">= 0"])
|
253
|
-
s.add_dependency(%q<jdbc-sqlite3>.freeze, [">= 0"])
|
254
|
-
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
255
|
-
s.add_dependency(%q<mysql2>.freeze, ["= 0.4.10"])
|
256
|
-
s.add_dependency(%q<pg>.freeze, ["= 0.21.0"])
|
257
|
-
s.add_dependency(%q<pry>.freeze, [">= 0"])
|
258
|
-
s.add_dependency(%q<rdoc>.freeze, [">= 0"])
|
259
|
-
s.add_dependency(%q<rspec>.freeze, ["= 3.4.0"])
|
260
|
-
s.add_dependency(%q<rubocop>.freeze, ["= 0.39.0"])
|
261
|
-
s.add_dependency(%q<sqlite3>.freeze, ["< 1.5"])
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
@@ -1,163 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# This configuration was generated by
|
10
|
-
# `rubocop --auto-gen-config`
|
11
|
-
# on 2015-12-20 21:21:20 +0100 using RuboCop version 0.35.1.
|
12
|
-
# The point is for the user to remove these configuration records
|
13
|
-
# one by one as the offenses are removed from the code base.
|
14
|
-
# Note that changes in the inspected code, or installation of new
|
15
|
-
# versions of RuboCop, may require this file to be generated again.
|
16
|
-
|
17
|
-
# Offense count: 43
|
18
|
-
# Configuration parameters: AllowSafeAssignment.
|
19
|
-
Lint/AssignmentInCondition:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
# Offense count: 1
|
23
|
-
Lint/ConditionPosition:
|
24
|
-
Exclude:
|
25
|
-
- 'lib/baza/model_handler.rb'
|
26
|
-
|
27
|
-
# Offense count: 2
|
28
|
-
Lint/HandleExceptions:
|
29
|
-
Exclude:
|
30
|
-
- 'spec/model_handler_spec.rb'
|
31
|
-
|
32
|
-
# Offense count: 1
|
33
|
-
Lint/NonLocalExitFromIterator:
|
34
|
-
Exclude:
|
35
|
-
- 'lib/baza/drivers/sqlite3/column.rb'
|
36
|
-
|
37
|
-
# Offense count: 8
|
38
|
-
Lint/ShadowingOuterLocalVariable:
|
39
|
-
Exclude:
|
40
|
-
- 'lib/baza/drivers/mysql/table.rb'
|
41
|
-
- 'lib/baza/drivers/sqlite3/table.rb'
|
42
|
-
- 'lib/baza/model_handler.rb'
|
43
|
-
- 'lib/baza/model_handler_sqlhelper.rb'
|
44
|
-
- 'lib/baza/revision.rb'
|
45
|
-
- 'spec/model_handler_spec.rb'
|
46
|
-
|
47
|
-
# Offense count: 1
|
48
|
-
Lint/UselessAccessModifier:
|
49
|
-
Exclude:
|
50
|
-
- 'lib/baza/model.rb'
|
51
|
-
|
52
|
-
# Offense count: 34
|
53
|
-
Lint/UselessAssignment:
|
54
|
-
Enabled: false
|
55
|
-
|
56
|
-
# Offense count: 51
|
57
|
-
Metrics/AbcSize:
|
58
|
-
Max: 558
|
59
|
-
|
60
|
-
# Offense count: 22
|
61
|
-
Metrics/BlockNesting:
|
62
|
-
Max: 6
|
63
|
-
|
64
|
-
# Offense count: 7
|
65
|
-
# Configuration parameters: CountComments.
|
66
|
-
Metrics/ClassLength:
|
67
|
-
Max: 684
|
68
|
-
|
69
|
-
# Offense count: 67
|
70
|
-
Metrics/CyclomaticComplexity:
|
71
|
-
Max: 128
|
72
|
-
|
73
|
-
# Offense count: 31
|
74
|
-
# Configuration parameters: AllowURI, URISchemes.
|
75
|
-
Metrics/LineLength:
|
76
|
-
Max: 311
|
77
|
-
|
78
|
-
# Offense count: 8
|
79
|
-
# Configuration parameters: CountComments.
|
80
|
-
Metrics/MethodLength:
|
81
|
-
Max: 382
|
82
|
-
|
83
|
-
# Offense count: 66
|
84
|
-
Metrics/PerceivedComplexity:
|
85
|
-
Max: 160
|
86
|
-
|
87
|
-
# Offense count: 1
|
88
|
-
Style/AccessorMethodName:
|
89
|
-
Exclude:
|
90
|
-
- 'lib/baza/db.rb'
|
91
|
-
|
92
|
-
# Offense count: 1
|
93
|
-
Style/AsciiComments:
|
94
|
-
Exclude:
|
95
|
-
- 'lib/baza/db.rb'
|
96
|
-
|
97
|
-
# Offense count: 1
|
98
|
-
Style/CaseEquality:
|
99
|
-
Exclude:
|
100
|
-
- 'lib/baza/drivers/mysql/result.rb'
|
101
|
-
|
102
|
-
# Offense count: 3
|
103
|
-
Style/ClassVars:
|
104
|
-
Exclude:
|
105
|
-
- 'lib/baza/model.rb'
|
106
|
-
- 'lib/baza/model_custom.rb'
|
107
|
-
|
108
|
-
# Offense count: 1
|
109
|
-
Style/EndOfLine:
|
110
|
-
Exclude:
|
111
|
-
- 'lib/baza/drivers/mysql.rb'
|
112
|
-
|
113
|
-
# Offense count: 1
|
114
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
115
|
-
Style/FormatString:
|
116
|
-
Exclude:
|
117
|
-
- 'lib/baza/row.rb'
|
118
|
-
|
119
|
-
# Offense count: 11
|
120
|
-
# Configuration parameters: AllowedVariables.
|
121
|
-
Style/GlobalVars:
|
122
|
-
Exclude:
|
123
|
-
- 'lib/baza/db.rb'
|
124
|
-
- 'lib/baza/model_custom.rb'
|
125
|
-
- 'lib/baza/row.rb'
|
126
|
-
|
127
|
-
# Offense count: 16
|
128
|
-
# Configuration parameters: MinBodyLength.
|
129
|
-
Style/GuardClause:
|
130
|
-
Exclude:
|
131
|
-
- 'lib/baza/db.rb'
|
132
|
-
- 'lib/baza/drivers/mysql/result.rb'
|
133
|
-
- 'lib/baza/drivers/sqlite3/result.rb'
|
134
|
-
- 'lib/baza/drivers/sqlite3_java/unbuffered_result.rb'
|
135
|
-
- 'lib/baza/idquery.rb'
|
136
|
-
- 'lib/baza/model.rb'
|
137
|
-
- 'lib/baza/model_handler.rb'
|
138
|
-
- 'lib/baza/query_buffer.rb'
|
139
|
-
- 'lib/baza/row.rb'
|
140
|
-
|
141
|
-
# Offense count: 1
|
142
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
143
|
-
Style/MethodName:
|
144
|
-
Enabled: false
|
145
|
-
|
146
|
-
# Offense count: 9
|
147
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
148
|
-
Style/PredicateName:
|
149
|
-
Exclude:
|
150
|
-
- 'lib/baza/model.rb'
|
151
|
-
- 'lib/baza/model_custom.rb'
|
152
|
-
- 'lib/baza/row.rb'
|
153
|
-
|
154
|
-
# Offense count: 2
|
155
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
156
|
-
Style/RaiseArgs:
|
157
|
-
Enabled: false
|
158
|
-
|
159
|
-
# Offense count: 1
|
160
|
-
# Cop supports --auto-correct.
|
161
|
-
# Configuration parameters: WordRegex.
|
162
|
-
Style/WordArray:
|
163
|
-
MinSize: 2
|
data/peak_flow.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
before_install:
|
2
|
-
- sudo apt-get install -y libmysqlclient-dev
|
3
|
-
before_script:
|
4
|
-
- cp spec/info_mysql_peak_flow.rb spec/info_mysql.rb
|
5
|
-
- cp spec/info_mysql2_peak_flow.rb spec/info_mysql2.rb
|
6
|
-
- cp spec/info_pg_peak_flow.rb spec/info_pg.rb
|
7
|
-
- cp spec/info_active_record_mysql_peak_flow.rb spec/info_active_record_mysql.rb
|
8
|
-
- cp spec/info_active_record_mysql2_peak_flow.rb spec/info_active_record_mysql2.rb
|
9
|
-
- cp spec/info_active_record_pg_peak_flow.rb spec/info_active_record_pg.rb
|
10
|
-
rvm: true
|
11
|
-
services:
|
12
|
-
postgres:
|
13
|
-
environment:
|
14
|
-
POSTGRES_USER: "build"
|
15
|
-
POSTGRES_PASSWORD: "password"
|
16
|
-
POSTGRES_DB: "baza"
|
17
|
-
expose:
|
18
|
-
- 5432
|
19
|
-
image: postgres:11.4
|
20
|
-
mysql:
|
21
|
-
environment:
|
22
|
-
- MYSQL_USER=build
|
23
|
-
- MYSQL_PASSWORD=password
|
24
|
-
- MYSQL_ROOT_PASSWORD=password
|
25
|
-
- MYSQL_DATABASE=baza
|
26
|
-
image: mysql:5.7.29
|
27
|
-
expose:
|
28
|
-
- 3306
|
29
|
-
script:
|
30
|
-
- bundle exec rspec --tag ~@mysql
|
31
|
-
- bundle exec rake best_practice_project:run
|
data/spec/baza/cloner_spec.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Baza::Cloner do
|
4
|
-
it "can clone drivers" do
|
5
|
-
require "info_active_record_pg"
|
6
|
-
conn = Baza::InfoActiveRecordPg.connection
|
7
|
-
baza_db = Baza::Cloner.from_active_record_connection(conn[:conn])
|
8
|
-
expect(baza_db.query("SELECT 1 AS test").fetch[:test].to_s).to eq "1"
|
9
|
-
end
|
10
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Baza::SqlQueries::GenericInsert do
|
4
|
-
let(:constant) do
|
5
|
-
const_name = "InfoPg"
|
6
|
-
require StringCases.camel_to_snake(const_name)
|
7
|
-
raise "Constant was not defined: '#{const_name}'." unless Baza.const_defined?(const_name)
|
8
|
-
Baza.const_get(const_name)
|
9
|
-
end
|
10
|
-
let(:db) { constant.new.db }
|
11
|
-
|
12
|
-
describe "#convert_line_breaks" do
|
13
|
-
it "converts line breaks to valid postgres sql" do
|
14
|
-
generic_insert = Baza::SqlQueries::GenericInsert.new(
|
15
|
-
db: db,
|
16
|
-
table_name: "test_table",
|
17
|
-
data: {
|
18
|
-
"test_column" => "data\nwith\nline\nbreaks"
|
19
|
-
},
|
20
|
-
replace_line_breaks: true
|
21
|
-
)
|
22
|
-
|
23
|
-
expect(generic_insert.to_sql).to eq "INSERT INTO \"test_table\" (\"test_column\") VALUES ('data' || CHR(10) || 'with' || CHR(10) || 'line' || CHR(10) || 'breaks')"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|