baza 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +84 -0
- data/.rubocop_todo.yml +17 -135
- data/.travis.yml +21 -0
- data/Gemfile +10 -7
- data/Gemfile.lock +39 -44
- data/README.md +61 -3
- data/VERSION +1 -1
- data/baza.gemspec +146 -98
- data/config/best_project_practice_rubocop.yml +8 -0
- data/config/best_project_practice_rubocop_todo.yml +6 -0
- data/lib/baza.rb +8 -12
- data/lib/baza/base_sql_driver.rb +198 -52
- data/lib/baza/cloner.rb +1 -0
- data/lib/baza/column.rb +26 -0
- data/lib/baza/database.rb +19 -3
- data/lib/baza/db.rb +69 -271
- data/lib/baza/driver.rb +1 -6
- data/lib/baza/{drivers → driver}/active_record.rb +65 -21
- data/lib/baza/{drivers → driver}/active_record/columns.rb +0 -0
- data/lib/baza/driver/active_record/commands.rb +10 -0
- data/lib/baza/driver/active_record/databases.rb +10 -0
- data/lib/baza/{drivers → driver}/active_record/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/active_record/result.rb +3 -1
- data/lib/baza/{drivers → driver}/active_record/tables.rb +0 -0
- data/lib/baza/driver/active_record/users.rb +12 -0
- data/lib/baza/{drivers → driver}/mysql.rb +9 -26
- data/lib/baza/{drivers → driver}/mysql/column.rb +14 -35
- data/lib/baza/{drivers → driver}/mysql/columns.rb +9 -12
- data/lib/baza/driver/mysql/commands.rb +39 -0
- data/lib/baza/driver/mysql/database.rb +64 -0
- data/lib/baza/driver/mysql/databases.rb +63 -0
- data/lib/baza/{drivers → driver}/mysql/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/result.rb +15 -7
- data/lib/baza/{drivers → driver}/mysql/sqlspecs.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql/table.rb +27 -43
- data/lib/baza/{drivers → driver}/mysql/tables.rb +5 -34
- data/lib/baza/{drivers → driver}/mysql/unbuffered_result.rb +8 -2
- data/lib/baza/driver/mysql/user.rb +22 -0
- data/lib/baza/driver/mysql/users.rb +39 -0
- data/lib/baza/{drivers → driver}/mysql2.rb +19 -49
- data/lib/baza/{drivers → driver}/mysql2/column.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/columns.rb +0 -0
- data/lib/baza/driver/mysql2/commands.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql2/database.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/databases.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/result.rb +3 -1
- data/lib/baza/{drivers → driver}/mysql2/table.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql2/tables.rb +0 -0
- data/lib/baza/driver/mysql2/user.rb +2 -0
- data/lib/baza/driver/mysql2/users.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql_java.rb +60 -38
- data/lib/baza/{drivers → driver}/mysql_java/column.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/columns.rb +0 -0
- data/lib/baza/driver/mysql_java/commands.rb +2 -0
- data/lib/baza/driver/mysql_java/database.rb +2 -0
- data/lib/baza/driver/mysql_java/databases.rb +2 -0
- data/lib/baza/{drivers → driver}/mysql_java/index.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/table.rb +0 -0
- data/lib/baza/{drivers → driver}/mysql_java/tables.rb +0 -0
- data/lib/baza/driver/mysql_java/user.rb +2 -0
- data/lib/baza/driver/mysql_java/users.rb +2 -0
- data/lib/baza/driver/pg.rb +80 -0
- data/lib/baza/driver/pg/column.rb +125 -0
- data/lib/baza/driver/pg/columns.rb +37 -0
- data/lib/baza/driver/pg/commands.rb +35 -0
- data/lib/baza/driver/pg/create_index_sql_creator.rb +51 -0
- data/lib/baza/driver/pg/database.rb +89 -0
- data/lib/baza/driver/pg/databases.rb +79 -0
- data/lib/baza/driver/pg/index.rb +35 -0
- data/lib/baza/driver/pg/indexes.rb +5 -0
- data/lib/baza/driver/pg/result.rb +139 -0
- data/lib/baza/driver/pg/table.rb +184 -0
- data/lib/baza/driver/pg/tables.rb +45 -0
- data/lib/baza/{drivers → driver}/sqlite3.rb +6 -24
- data/lib/baza/{drivers → driver}/sqlite3/column.rb +22 -24
- data/lib/baza/{drivers → driver}/sqlite3/columns.rb +6 -6
- data/lib/baza/driver/sqlite3/commands.rb +28 -0
- data/lib/baza/{drivers → driver}/sqlite3/database.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/databases.rb +0 -1
- data/lib/baza/{drivers → driver}/sqlite3/index.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/result.rb +14 -6
- data/lib/baza/{drivers → driver}/sqlite3/sqlspecs.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3/table.rb +25 -16
- data/lib/baza/{drivers → driver}/sqlite3/tables.rb +5 -6
- data/lib/baza/{drivers → driver}/sqlite3/unbuffered_result.rb +8 -2
- data/lib/baza/{drivers → driver}/sqlite3_java.rb +13 -23
- data/lib/baza/{drivers → driver}/sqlite3_java/column.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/columns.rb +0 -0
- data/lib/baza/driver/sqlite3_java/commands.rb +2 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/database.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/index.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/indexes.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/table.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/tables.rb +0 -0
- data/lib/baza/{drivers → driver}/sqlite3_java/unbuffered_result.rb +14 -9
- data/lib/baza/{drivers → driver}/sqlite3_rhodes.rb +6 -24
- data/lib/baza/errors.rb +2 -0
- data/lib/baza/idquery.rb +15 -8
- data/lib/baza/index.rb +7 -0
- data/lib/baza/jdbc_driver.rb +4 -16
- data/lib/baza/jdbc_result.rb +20 -12
- data/lib/baza/mysql_base_driver.rb +7 -7
- data/lib/baza/query_buffer.rb +20 -19
- data/lib/baza/row.rb +16 -16
- data/lib/baza/sql_queries.rb +3 -0
- data/lib/baza/sql_queries/generic_insert.rb +81 -0
- data/lib/baza/sql_queries/generic_update.rb +31 -0
- data/lib/baza/sql_queries/mysql_upsert.rb +52 -0
- data/lib/baza/sql_queries/mysql_upsert_duplicate_key.rb +57 -0
- data/lib/baza/sql_queries/non_atomic_upsert.rb +25 -0
- data/lib/baza/sql_queries/postgres_upsert_duplicate_key.rb +118 -0
- data/lib/baza/sql_queries/select.rb +170 -0
- data/lib/baza/sql_queries/sqlite_upsert_duplicate_key.rb +99 -0
- data/lib/baza/table.rb +35 -8
- data/spec/active_record/models/user.rb +3 -0
- data/spec/{cloner_spec.rb → baza/cloner_spec.rb} +0 -0
- data/spec/drivers/active_record_mysql2_spec.rb +5 -3
- data/spec/drivers/active_record_mysql_spec.rb +2 -1
- data/spec/drivers/active_record_pg_spec.rb +20 -0
- data/spec/drivers/active_record_sqlite3_spec.rb +2 -1
- data/spec/drivers/mysql2_spec.rb +1 -1
- data/spec/drivers/mysql_spec.rb +10 -10
- data/spec/drivers/pg_spec.rb +18 -0
- data/spec/drivers/sqlite3_spec.rb +7 -8
- data/spec/info_active_record_example.rb +1 -1
- data/spec/{info_active_record_mysql2.rb → info_active_record_mysql2_example.rb} +3 -2
- data/spec/info_active_record_mysql2_travis.rb +35 -0
- data/spec/{info_active_record_mysql.rb → info_active_record_mysql_example.rb} +5 -4
- data/spec/info_active_record_mysql_travis.rb +36 -0
- data/spec/info_active_record_pg_example.rb +36 -0
- data/spec/info_active_record_pg_travis.rb +34 -0
- data/spec/info_active_record_sqlite3.rb +1 -1
- data/spec/info_mysql2_example.rb +1 -3
- data/spec/{info_mysql2_shippable.rb → info_mysql2_travis.rb} +2 -4
- data/spec/info_mysql_example.rb +1 -3
- data/spec/{info_mysql_shippable.rb → info_mysql_travis.rb} +2 -4
- data/spec/info_pg_example.rb +22 -0
- data/spec/info_pg_travis.rb +20 -0
- data/spec/info_sqlite3.rb +1 -3
- data/spec/spec_helper.rb +1 -1
- data/spec/support/driver_active_record_collection.rb +62 -0
- data/spec/support/driver_collection.rb +136 -121
- data/spec/support/driver_columns_collection.rb +19 -10
- data/spec/support/driver_databases_collection.rb +23 -1
- data/spec/support/driver_indexes_collection.rb +2 -2
- data/spec/support/driver_tables_collection.rb +24 -4
- data/spec/support/driver_users_collection.rb +53 -0
- metadata +185 -104
- data/lib/baza/drivers/mysql/database.rb +0 -28
- data/lib/baza/drivers/mysql/databases.rb +0 -35
- data/lib/baza/drivers/mysql_java/database.rb +0 -2
- data/lib/baza/drivers/mysql_java/databases.rb +0 -2
- data/lib/baza/model.rb +0 -875
- data/lib/baza/model_custom.rb +0 -155
- data/lib/baza/model_handler.rb +0 -910
- data/lib/baza/model_handler_sqlhelper.rb +0 -484
- data/lib/baza/revision.rb +0 -383
- data/shippable.yml +0 -17
- data/spec/info_active_record_mysql2_shippable.rb +0 -34
- data/spec/info_active_record_mysql_shippable.rb +0 -34
- data/spec/model_handler_spec.rb +0 -431
@@ -47,11 +47,11 @@ shared_examples_for "a baza indexes driver" do
|
|
47
47
|
|
48
48
|
describe "#unique?" do
|
49
49
|
it "returns true when it is unique" do
|
50
|
-
test_table.index("email").unique
|
50
|
+
expect(test_table.index("email").unique?).to eq true
|
51
51
|
end
|
52
52
|
|
53
53
|
it "returns false when it isn't unique" do
|
54
|
-
test_table.index("text").unique
|
54
|
+
expect(test_table.index("text").unique?).to eq false
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -4,10 +4,13 @@ shared_examples_for "a baza tables driver" do
|
|
4
4
|
let(:db) { driver.db }
|
5
5
|
let(:db2) { driver2.db }
|
6
6
|
let(:test_table) do
|
7
|
-
db.tables.create(
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
db.tables.create(
|
8
|
+
"test",
|
9
|
+
columns: [
|
10
|
+
{name: "id", type: :int, autoincr: true, primarykey: true},
|
11
|
+
{name: "text", type: :varchar}
|
12
|
+
]
|
13
|
+
)
|
11
14
|
db.tables[:test]
|
12
15
|
end
|
13
16
|
|
@@ -34,6 +37,22 @@ shared_examples_for "a baza tables driver" do
|
|
34
37
|
# FIXME: How to validate?
|
35
38
|
end
|
36
39
|
|
40
|
+
it "#rows_count" do
|
41
|
+
expect(test_table.rows_count).to eq 0
|
42
|
+
test_table.insert(text: "Test")
|
43
|
+
expect(test_table.rows_count).to eq 1
|
44
|
+
end
|
45
|
+
|
46
|
+
it "#native?" do
|
47
|
+
expect(test_table.native?).to eq false
|
48
|
+
end
|
49
|
+
|
50
|
+
it "#row" do
|
51
|
+
expect { test_table.row(500) }.to raise_error(Baza::Errors::RowNotFound)
|
52
|
+
test_table.insert(id: 1, text: "Test")
|
53
|
+
expect(test_table.row(1)[:text]).to eq "Test"
|
54
|
+
end
|
55
|
+
|
37
56
|
it "#truncate" do
|
38
57
|
test_table
|
39
58
|
|
@@ -52,6 +71,7 @@ shared_examples_for "a baza tables driver" do
|
|
52
71
|
it "#clone" do
|
53
72
|
test_table
|
54
73
|
test_table.create_indexes([{name: "index_on_text", columns: ["text"]}])
|
74
|
+
|
55
75
|
expect(test_table.indexes.length).to eq 1
|
56
76
|
|
57
77
|
test_table.insert(text: "test1")
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
shared_examples_for "a baza users driver" do
|
4
|
+
let(:driver) { constant.new }
|
5
|
+
let(:db) { driver.db }
|
6
|
+
let(:test_user_name) { "baza-test-create" }
|
7
|
+
let(:user) { db.users.create(name: test_user_name, host: "localhost", password: "mypassword") }
|
8
|
+
|
9
|
+
before do
|
10
|
+
# Drop any existing user with the test user name
|
11
|
+
begin
|
12
|
+
db.users.find_by_name(test_user_name).drop
|
13
|
+
rescue Baza::Errors::UserNotFound # rubocop:disable Lint/HandleExceptions
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
it "Users#list" do
|
18
|
+
root_found = false
|
19
|
+
db.users.list do |user|
|
20
|
+
if user.name == "root"
|
21
|
+
root_found = true
|
22
|
+
break
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
expect(root_found).to eq true
|
27
|
+
end
|
28
|
+
|
29
|
+
it "Users#find_by_name" do
|
30
|
+
root_user = db.users.find_by_name("root")
|
31
|
+
expect(root_user.name).to eq "root"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "Users#create" do
|
35
|
+
my_user = db.users.create(name: test_user_name, host: "localhost", password: "mypassword")
|
36
|
+
|
37
|
+
expect(my_user.name).to eq test_user_name
|
38
|
+
expect(my_user.host).to eq "localhost"
|
39
|
+
end
|
40
|
+
|
41
|
+
it "User#drop" do
|
42
|
+
user.drop
|
43
|
+
expect { db.users.find_by_name(test_user_name) }.to raise_error(Baza::Errors::UserNotFound)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "User#name" do
|
47
|
+
expect(user.name).to eq test_user_name
|
48
|
+
end
|
49
|
+
|
50
|
+
it "User#host" do
|
51
|
+
expect(user.host).to eq "localhost"
|
52
|
+
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baza
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: datet
|
@@ -25,75 +25,103 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.0.25
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: array_enumerator
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.10
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
40
|
+
version: 0.0.10
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: auto_autoloader
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: event_handler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.0.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.0.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simple_delegate
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.0.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.0.2
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: string-cases
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.0.
|
89
|
+
version: 0.0.4
|
62
90
|
type: :runtime
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.0.
|
96
|
+
version: 0.0.4
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
98
|
+
name: wref
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - "~>"
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.0.
|
103
|
+
version: 0.0.8
|
76
104
|
type: :runtime
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.
|
110
|
+
version: 0.0.8
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rspec
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - '='
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
117
|
+
version: 3.4.0
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - '='
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
124
|
+
version: 3.4.0
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: rdoc
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,30 +238,44 @@ dependencies:
|
|
210
238
|
name: mysql
|
211
239
|
requirement: !ruby/object:Gem::Requirement
|
212
240
|
requirements:
|
213
|
-
- -
|
241
|
+
- - '='
|
214
242
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
243
|
+
version: 2.9.1
|
216
244
|
type: :development
|
217
245
|
prerelease: false
|
218
246
|
version_requirements: !ruby/object:Gem::Requirement
|
219
247
|
requirements:
|
220
|
-
- -
|
248
|
+
- - '='
|
221
249
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
250
|
+
version: 2.9.1
|
223
251
|
- !ruby/object:Gem::Dependency
|
224
252
|
name: mysql2
|
225
253
|
requirement: !ruby/object:Gem::Requirement
|
226
254
|
requirements:
|
227
|
-
- -
|
255
|
+
- - '='
|
228
256
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
257
|
+
version: 0.4.2
|
230
258
|
type: :development
|
231
259
|
prerelease: false
|
232
260
|
version_requirements: !ruby/object:Gem::Requirement
|
233
261
|
requirements:
|
234
|
-
- -
|
262
|
+
- - '='
|
235
263
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
264
|
+
version: 0.4.2
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: pg
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - '='
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 0.18.4
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - '='
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 0.18.4
|
237
279
|
- !ruby/object:Gem::Dependency
|
238
280
|
name: activerecord
|
239
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,30 +294,30 @@ dependencies:
|
|
252
294
|
name: best_practice_project
|
253
295
|
requirement: !ruby/object:Gem::Requirement
|
254
296
|
requirements:
|
255
|
-
- -
|
297
|
+
- - '='
|
256
298
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
299
|
+
version: 0.0.9
|
258
300
|
type: :development
|
259
301
|
prerelease: false
|
260
302
|
version_requirements: !ruby/object:Gem::Requirement
|
261
303
|
requirements:
|
262
|
-
- -
|
304
|
+
- - '='
|
263
305
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
306
|
+
version: 0.0.9
|
265
307
|
- !ruby/object:Gem::Dependency
|
266
308
|
name: rubocop
|
267
309
|
requirement: !ruby/object:Gem::Requirement
|
268
310
|
requirements:
|
269
311
|
- - '='
|
270
312
|
- !ruby/object:Gem::Version
|
271
|
-
version: 0.
|
313
|
+
version: 0.39.0
|
272
314
|
type: :development
|
273
315
|
prerelease: false
|
274
316
|
version_requirements: !ruby/object:Gem::Requirement
|
275
317
|
requirements:
|
276
318
|
- - '='
|
277
319
|
- !ruby/object:Gem::Version
|
278
|
-
version: 0.
|
320
|
+
version: 0.39.0
|
279
321
|
description: A database abstraction layer, model framework and database framework.
|
280
322
|
email: kj@gfish.com
|
281
323
|
executables: []
|
@@ -286,7 +328,9 @@ extra_rdoc_files:
|
|
286
328
|
files:
|
287
329
|
- ".document"
|
288
330
|
- ".rspec"
|
331
|
+
- ".rubocop.yml"
|
289
332
|
- ".rubocop_todo.yml"
|
333
|
+
- ".travis.yml"
|
290
334
|
- Gemfile
|
291
335
|
- Gemfile.lock
|
292
336
|
- LICENSE.txt
|
@@ -307,107 +351,144 @@ files:
|
|
307
351
|
- lib/baza/db.rb
|
308
352
|
- lib/baza/dbtime.rb
|
309
353
|
- lib/baza/driver.rb
|
310
|
-
- lib/baza/
|
311
|
-
- lib/baza/
|
312
|
-
- lib/baza/
|
313
|
-
- lib/baza/
|
314
|
-
- lib/baza/
|
315
|
-
- lib/baza/
|
316
|
-
- lib/baza/
|
317
|
-
- lib/baza/
|
318
|
-
- lib/baza/
|
319
|
-
- lib/baza/
|
320
|
-
- lib/baza/
|
321
|
-
- lib/baza/
|
322
|
-
- lib/baza/
|
323
|
-
- lib/baza/
|
324
|
-
- lib/baza/
|
325
|
-
- lib/baza/
|
326
|
-
- lib/baza/
|
327
|
-
- lib/baza/
|
328
|
-
- lib/baza/
|
329
|
-
- lib/baza/
|
330
|
-
- lib/baza/
|
331
|
-
- lib/baza/
|
332
|
-
- lib/baza/
|
333
|
-
- lib/baza/
|
334
|
-
- lib/baza/
|
335
|
-
- lib/baza/
|
336
|
-
- lib/baza/
|
337
|
-
- lib/baza/
|
338
|
-
- lib/baza/
|
339
|
-
- lib/baza/
|
340
|
-
- lib/baza/
|
341
|
-
- lib/baza/
|
342
|
-
- lib/baza/
|
343
|
-
- lib/baza/
|
344
|
-
- lib/baza/
|
345
|
-
- lib/baza/
|
346
|
-
- lib/baza/
|
347
|
-
- lib/baza/
|
348
|
-
- lib/baza/
|
349
|
-
- lib/baza/
|
350
|
-
- lib/baza/
|
351
|
-
- lib/baza/
|
352
|
-
- lib/baza/
|
353
|
-
- lib/baza/
|
354
|
-
- lib/baza/
|
355
|
-
- lib/baza/
|
356
|
-
- lib/baza/
|
357
|
-
- lib/baza/
|
358
|
-
- lib/baza/
|
359
|
-
- lib/baza/
|
360
|
-
- lib/baza/
|
361
|
-
- lib/baza/
|
362
|
-
- lib/baza/
|
363
|
-
- lib/baza/
|
364
|
-
- lib/baza/
|
365
|
-
- lib/baza/
|
366
|
-
- lib/baza/
|
367
|
-
- lib/baza/
|
354
|
+
- lib/baza/driver/active_record.rb
|
355
|
+
- lib/baza/driver/active_record/columns.rb
|
356
|
+
- lib/baza/driver/active_record/commands.rb
|
357
|
+
- lib/baza/driver/active_record/databases.rb
|
358
|
+
- lib/baza/driver/active_record/indexes.rb
|
359
|
+
- lib/baza/driver/active_record/result.rb
|
360
|
+
- lib/baza/driver/active_record/tables.rb
|
361
|
+
- lib/baza/driver/active_record/users.rb
|
362
|
+
- lib/baza/driver/mysql.rb
|
363
|
+
- lib/baza/driver/mysql/column.rb
|
364
|
+
- lib/baza/driver/mysql/columns.rb
|
365
|
+
- lib/baza/driver/mysql/commands.rb
|
366
|
+
- lib/baza/driver/mysql/database.rb
|
367
|
+
- lib/baza/driver/mysql/databases.rb
|
368
|
+
- lib/baza/driver/mysql/index.rb
|
369
|
+
- lib/baza/driver/mysql/indexes.rb
|
370
|
+
- lib/baza/driver/mysql/result.rb
|
371
|
+
- lib/baza/driver/mysql/sqlspecs.rb
|
372
|
+
- lib/baza/driver/mysql/table.rb
|
373
|
+
- lib/baza/driver/mysql/tables.rb
|
374
|
+
- lib/baza/driver/mysql/unbuffered_result.rb
|
375
|
+
- lib/baza/driver/mysql/user.rb
|
376
|
+
- lib/baza/driver/mysql/users.rb
|
377
|
+
- lib/baza/driver/mysql2.rb
|
378
|
+
- lib/baza/driver/mysql2/column.rb
|
379
|
+
- lib/baza/driver/mysql2/columns.rb
|
380
|
+
- lib/baza/driver/mysql2/commands.rb
|
381
|
+
- lib/baza/driver/mysql2/database.rb
|
382
|
+
- lib/baza/driver/mysql2/databases.rb
|
383
|
+
- lib/baza/driver/mysql2/index.rb
|
384
|
+
- lib/baza/driver/mysql2/indexes.rb
|
385
|
+
- lib/baza/driver/mysql2/result.rb
|
386
|
+
- lib/baza/driver/mysql2/table.rb
|
387
|
+
- lib/baza/driver/mysql2/tables.rb
|
388
|
+
- lib/baza/driver/mysql2/user.rb
|
389
|
+
- lib/baza/driver/mysql2/users.rb
|
390
|
+
- lib/baza/driver/mysql_java.rb
|
391
|
+
- lib/baza/driver/mysql_java/column.rb
|
392
|
+
- lib/baza/driver/mysql_java/columns.rb
|
393
|
+
- lib/baza/driver/mysql_java/commands.rb
|
394
|
+
- lib/baza/driver/mysql_java/database.rb
|
395
|
+
- lib/baza/driver/mysql_java/databases.rb
|
396
|
+
- lib/baza/driver/mysql_java/index.rb
|
397
|
+
- lib/baza/driver/mysql_java/indexes.rb
|
398
|
+
- lib/baza/driver/mysql_java/table.rb
|
399
|
+
- lib/baza/driver/mysql_java/tables.rb
|
400
|
+
- lib/baza/driver/mysql_java/user.rb
|
401
|
+
- lib/baza/driver/mysql_java/users.rb
|
402
|
+
- lib/baza/driver/pg.rb
|
403
|
+
- lib/baza/driver/pg/column.rb
|
404
|
+
- lib/baza/driver/pg/columns.rb
|
405
|
+
- lib/baza/driver/pg/commands.rb
|
406
|
+
- lib/baza/driver/pg/create_index_sql_creator.rb
|
407
|
+
- lib/baza/driver/pg/database.rb
|
408
|
+
- lib/baza/driver/pg/databases.rb
|
409
|
+
- lib/baza/driver/pg/index.rb
|
410
|
+
- lib/baza/driver/pg/indexes.rb
|
411
|
+
- lib/baza/driver/pg/result.rb
|
412
|
+
- lib/baza/driver/pg/table.rb
|
413
|
+
- lib/baza/driver/pg/tables.rb
|
414
|
+
- lib/baza/driver/sqlite3.rb
|
415
|
+
- lib/baza/driver/sqlite3/column.rb
|
416
|
+
- lib/baza/driver/sqlite3/columns.rb
|
417
|
+
- lib/baza/driver/sqlite3/commands.rb
|
418
|
+
- lib/baza/driver/sqlite3/database.rb
|
419
|
+
- lib/baza/driver/sqlite3/databases.rb
|
420
|
+
- lib/baza/driver/sqlite3/index.rb
|
421
|
+
- lib/baza/driver/sqlite3/indexes.rb
|
422
|
+
- lib/baza/driver/sqlite3/result.rb
|
423
|
+
- lib/baza/driver/sqlite3/sqlspecs.rb
|
424
|
+
- lib/baza/driver/sqlite3/table.rb
|
425
|
+
- lib/baza/driver/sqlite3/tables.rb
|
426
|
+
- lib/baza/driver/sqlite3/unbuffered_result.rb
|
427
|
+
- lib/baza/driver/sqlite3_java.rb
|
428
|
+
- lib/baza/driver/sqlite3_java/column.rb
|
429
|
+
- lib/baza/driver/sqlite3_java/columns.rb
|
430
|
+
- lib/baza/driver/sqlite3_java/commands.rb
|
431
|
+
- lib/baza/driver/sqlite3_java/database.rb
|
432
|
+
- lib/baza/driver/sqlite3_java/index.rb
|
433
|
+
- lib/baza/driver/sqlite3_java/indexes.rb
|
434
|
+
- lib/baza/driver/sqlite3_java/table.rb
|
435
|
+
- lib/baza/driver/sqlite3_java/tables.rb
|
436
|
+
- lib/baza/driver/sqlite3_java/unbuffered_result.rb
|
437
|
+
- lib/baza/driver/sqlite3_rhodes.rb
|
368
438
|
- lib/baza/dump.rb
|
369
439
|
- lib/baza/errors.rb
|
370
440
|
- lib/baza/idquery.rb
|
371
441
|
- lib/baza/index.rb
|
372
442
|
- lib/baza/jdbc_driver.rb
|
373
443
|
- lib/baza/jdbc_result.rb
|
374
|
-
- lib/baza/model.rb
|
375
|
-
- lib/baza/model_custom.rb
|
376
|
-
- lib/baza/model_handler.rb
|
377
|
-
- lib/baza/model_handler_sqlhelper.rb
|
378
444
|
- lib/baza/mysql_base_driver.rb
|
379
445
|
- lib/baza/query_buffer.rb
|
380
446
|
- lib/baza/result_base.rb
|
381
|
-
- lib/baza/revision.rb
|
382
447
|
- lib/baza/row.rb
|
448
|
+
- lib/baza/sql_queries.rb
|
449
|
+
- lib/baza/sql_queries/generic_insert.rb
|
450
|
+
- lib/baza/sql_queries/generic_update.rb
|
451
|
+
- lib/baza/sql_queries/mysql_upsert.rb
|
452
|
+
- lib/baza/sql_queries/mysql_upsert_duplicate_key.rb
|
453
|
+
- lib/baza/sql_queries/non_atomic_upsert.rb
|
454
|
+
- lib/baza/sql_queries/postgres_upsert_duplicate_key.rb
|
455
|
+
- lib/baza/sql_queries/select.rb
|
456
|
+
- lib/baza/sql_queries/sqlite_upsert_duplicate_key.rb
|
383
457
|
- lib/baza/sqlspecs.rb
|
384
458
|
- lib/baza/table.rb
|
385
|
-
-
|
386
|
-
- spec/cloner_spec.rb
|
459
|
+
- spec/active_record/models/user.rb
|
460
|
+
- spec/baza/cloner_spec.rb
|
387
461
|
- spec/drivers/active_record_mysql2_spec.rb
|
388
462
|
- spec/drivers/active_record_mysql_spec.rb
|
463
|
+
- spec/drivers/active_record_pg_spec.rb
|
389
464
|
- spec/drivers/active_record_sqlite3_spec.rb
|
390
465
|
- spec/drivers/mysql2_spec.rb
|
391
466
|
- spec/drivers/mysql_spec.rb
|
467
|
+
- spec/drivers/pg_spec.rb
|
392
468
|
- spec/drivers/sqlite3_spec.rb
|
393
469
|
- spec/info_active_record_example.rb
|
394
|
-
- spec/
|
395
|
-
- spec/
|
396
|
-
- spec/
|
397
|
-
- spec/
|
470
|
+
- spec/info_active_record_mysql2_example.rb
|
471
|
+
- spec/info_active_record_mysql2_travis.rb
|
472
|
+
- spec/info_active_record_mysql_example.rb
|
473
|
+
- spec/info_active_record_mysql_travis.rb
|
474
|
+
- spec/info_active_record_pg_example.rb
|
475
|
+
- spec/info_active_record_pg_travis.rb
|
398
476
|
- spec/info_active_record_sqlite3.rb
|
399
477
|
- spec/info_mysql2_example.rb
|
400
|
-
- spec/
|
478
|
+
- spec/info_mysql2_travis.rb
|
401
479
|
- spec/info_mysql_example.rb
|
402
|
-
- spec/
|
480
|
+
- spec/info_mysql_travis.rb
|
481
|
+
- spec/info_pg_example.rb
|
482
|
+
- spec/info_pg_travis.rb
|
403
483
|
- spec/info_sqlite3.rb
|
404
|
-
- spec/model_handler_spec.rb
|
405
484
|
- spec/spec_helper.rb
|
485
|
+
- spec/support/driver_active_record_collection.rb
|
406
486
|
- spec/support/driver_collection.rb
|
407
487
|
- spec/support/driver_columns_collection.rb
|
408
488
|
- spec/support/driver_databases_collection.rb
|
409
489
|
- spec/support/driver_indexes_collection.rb
|
410
490
|
- spec/support/driver_tables_collection.rb
|
491
|
+
- spec/support/driver_users_collection.rb
|
411
492
|
homepage: http://github.com/kaspernj/baza
|
412
493
|
licenses:
|
413
494
|
- MIT
|
@@ -428,7 +509,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
428
509
|
version: '0'
|
429
510
|
requirements: []
|
430
511
|
rubyforge_project:
|
431
|
-
rubygems_version: 2.
|
512
|
+
rubygems_version: 2.2.2
|
432
513
|
signing_key:
|
433
514
|
specification_version: 4
|
434
515
|
summary: A database abstraction layer, model framework and database framework.
|