baza 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -11
- data/Gemfile.lock +76 -50
- data/README.md +3 -2
- data/VERSION +1 -1
- data/baza.gemspec +107 -54
- data/lib/baza.rb +1 -1
- data/lib/baza/base_sql_driver.rb +64 -0
- data/lib/baza/cloner.rb +31 -0
- data/{include → lib/baza}/column.rb +0 -0
- data/{include → lib/baza}/db.rb +61 -49
- data/{include → lib/baza}/dbtime.rb +0 -0
- data/{include → lib/baza}/driver.rb +1 -1
- data/lib/baza/drivers/active_record.rb +107 -0
- data/lib/baza/drivers/active_record/columns.rb +10 -0
- data/lib/baza/drivers/active_record/indexes.rb +10 -0
- data/lib/baza/drivers/active_record/result.rb +23 -0
- data/lib/baza/drivers/active_record/tables.rb +12 -0
- data/lib/baza/drivers/mysql.rb +220 -0
- data/{include/drivers/mysql/mysql_column.rb → lib/baza/drivers/mysql/column.rb} +0 -0
- data/{include/drivers/mysql/mysql_columns.rb → lib/baza/drivers/mysql/columns.rb} +0 -0
- data/{include/drivers/mysql/mysql_index.rb → lib/baza/drivers/mysql/index.rb} +0 -0
- data/{include/drivers/mysql/mysql_indexes.rb → lib/baza/drivers/mysql/indexes.rb} +0 -0
- data/lib/baza/drivers/mysql/result.rb +81 -0
- data/{include/drivers/mysql/mysql_sqlspecs.rb → lib/baza/drivers/mysql/sqlspecs.rb} +0 -0
- data/{include/drivers/mysql/mysql_table.rb → lib/baza/drivers/mysql/table.rb} +2 -2
- data/{include/drivers/mysql/mysql_tables.rb → lib/baza/drivers/mysql/tables.rb} +0 -1
- data/{include/drivers/mysql/mysql_result_unbuffered.rb → lib/baza/drivers/mysql/unbuffered_result.rb} +19 -23
- data/lib/baza/drivers/mysql2.rb +259 -0
- data/lib/baza/drivers/mysql2/column.rb +2 -0
- data/lib/baza/drivers/mysql2/columns.rb +2 -0
- data/lib/baza/drivers/mysql2/index.rb +2 -0
- data/lib/baza/drivers/mysql2/indexes.rb +2 -0
- data/lib/baza/drivers/mysql2/result.rb +26 -0
- data/lib/baza/drivers/mysql2/table.rb +2 -0
- data/lib/baza/drivers/mysql2/tables.rb +2 -0
- data/lib/baza/drivers/mysql_java.rb +178 -0
- data/lib/baza/drivers/mysql_java/column.rb +2 -0
- data/lib/baza/drivers/mysql_java/columns.rb +2 -0
- data/lib/baza/drivers/mysql_java/index.rb +2 -0
- data/lib/baza/drivers/mysql_java/indexes.rb +2 -0
- data/lib/baza/drivers/mysql_java/table.rb +2 -0
- data/lib/baza/drivers/mysql_java/tables.rb +2 -0
- data/lib/baza/drivers/sqlite3.rb +81 -0
- data/{include/drivers/sqlite3/sqlite3_column.rb → lib/baza/drivers/sqlite3/column.rb} +0 -0
- data/{include/drivers/sqlite3/sqlite3_columns.rb → lib/baza/drivers/sqlite3/columns.rb} +0 -0
- data/{include/drivers/sqlite3/sqlite3_index.rb → lib/baza/drivers/sqlite3/index.rb} +0 -0
- data/{include/drivers/sqlite3/sqlite3_indexes.rb → lib/baza/drivers/sqlite3/indexes.rb} +0 -0
- data/lib/baza/drivers/sqlite3/result.rb +64 -0
- data/{include/drivers/sqlite3/sqlite3_sqlspecs.rb → lib/baza/drivers/sqlite3/sqlspecs.rb} +1 -1
- data/{include/drivers/sqlite3/sqlite3_table.rb → lib/baza/drivers/sqlite3/table.rb} +0 -0
- data/{include/drivers/sqlite3/sqlite3_tables.rb → lib/baza/drivers/sqlite3/tables.rb} +0 -0
- data/lib/baza/drivers/sqlite3/unbuffered_result.rb +33 -0
- data/lib/baza/drivers/sqlite3_java.rb +75 -0
- data/lib/baza/drivers/sqlite3_java/column.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/columns.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/index.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/indexes.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/table.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/tables.rb +2 -0
- data/lib/baza/drivers/sqlite3_java/unbuffered_result.rb +33 -0
- data/lib/baza/drivers/sqlite3_rhodes.rb +78 -0
- data/{include → lib/baza}/dump.rb +0 -0
- data/{include → lib/baza}/errors.rb +0 -0
- data/{include → lib/baza}/idquery.rb +0 -0
- data/{include → lib/baza}/index.rb +0 -0
- data/lib/baza/jdbc_driver.rb +102 -0
- data/lib/baza/jdbc_result.rb +125 -0
- data/{include → lib/baza}/model.rb +2 -2
- data/{include → lib/baza}/model_custom.rb +0 -0
- data/{include → lib/baza}/model_handler.rb +1 -1
- data/{include → lib/baza}/model_handler_sqlhelper.rb +0 -0
- data/{include → lib/baza}/query_buffer.rb +2 -2
- data/lib/baza/result_base.rb +25 -0
- data/{include → lib/baza}/revision.rb +1 -1
- data/{include → lib/baza}/row.rb +0 -0
- data/{include → lib/baza}/sqlspecs.rb +0 -0
- data/{include → lib/baza}/table.rb +0 -0
- data/shippable.yml +3 -1
- data/spec/cloner_spec.rb +10 -0
- data/spec/drivers/active_record_mysql2_spec.rb +18 -0
- data/spec/drivers/active_record_mysql_spec.rb +16 -0
- data/spec/drivers/active_record_sqlite3_spec.rb +16 -0
- data/spec/drivers/mysql2_spec.rb +16 -0
- data/spec/{include/drivers → drivers}/mysql_spec.rb +9 -1
- data/spec/{include/drivers → drivers}/sqlite3_spec.rb +8 -0
- data/spec/info_active_record_mysql.rb +37 -0
- data/spec/info_active_record_mysql2.rb +37 -0
- data/spec/info_active_record_mysql2_shippable.rb +36 -0
- data/spec/info_active_record_mysql_shippable.rb +36 -0
- data/spec/info_active_record_sqlite3.rb +37 -0
- data/spec/info_mysql2_example.rb +23 -0
- data/spec/info_mysql2_shippable.rb +22 -0
- data/spec/info_mysql_example.rb +3 -4
- data/spec/info_mysql_shippable.rb +7 -17
- data/spec/info_sqlite3.rb +5 -4
- data/spec/model_handler_spec.rb +137 -105
- data/spec/spec_helper.rb +8 -0
- data/spec/support/driver_collection.rb +124 -34
- data/spec/support/driver_columns_collection.rb +0 -7
- data/spec/support/driver_indexes_collection.rb +4 -11
- data/spec/support/driver_tables_collection.rb +0 -7
- metadata +160 -52
- data/include/cloner.rb +0 -18
- data/include/drivers/active_record/active_record.rb +0 -159
- data/include/drivers/mysql/mysql.rb +0 -443
- data/include/drivers/mysql/mysql_result.rb +0 -42
- data/include/drivers/mysql/mysql_result_java.rb +0 -61
- data/include/drivers/mysql/mysql_result_mysql2.rb +0 -26
- data/include/drivers/sqlite3/sqlite3.rb +0 -159
- data/include/drivers/sqlite3/sqlite3_result.rb +0 -35
- data/include/drivers/sqlite3/sqlite3_result_java.rb +0 -39
- data/spec/include/cloner_spec.rb +0 -10
- data/spec/include/drivers/active_record_spec.rb +0 -8
- data/spec/info_active_record.rb +0 -49
- data/spec/info_active_record_shippable.rb +0 -47
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,14 @@ CodeClimate::TestReporter.start
|
|
3
3
|
|
4
4
|
require 'baza'
|
5
5
|
|
6
|
+
if RUBY_PLATFORM == 'java'
|
7
|
+
require 'jdbc/mysql'
|
8
|
+
::Jdbc::MySQL.load_driver
|
9
|
+
|
10
|
+
require 'jdbc/sqlite3'
|
11
|
+
::Jdbc::SQLite3.load_driver
|
12
|
+
end
|
13
|
+
|
6
14
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
7
15
|
|
8
16
|
RSpec.configure do |config|
|
@@ -1,24 +1,24 @@
|
|
1
1
|
shared_examples_for "a baza driver" do
|
2
|
-
let(:constant)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
let(:
|
12
|
-
let(:db2){ driver2.db }
|
13
|
-
let(:test_table){
|
2
|
+
let(:driver) { constant.new(type_translation: :string) }
|
3
|
+
let(:driver2) { constant.new }
|
4
|
+
let(:db) { driver.db }
|
5
|
+
let(:db2) { driver2.db }
|
6
|
+
let(:db_with_type_translation) { constant.new(type_translation: true, debug: false).db }
|
7
|
+
let(:row) do
|
8
|
+
test_table.insert(text: 'Kasper', number: 30, float: 4.5)
|
9
|
+
db.select(:test, text: 'Kasper').fetch
|
10
|
+
end
|
11
|
+
let(:test_table) do
|
14
12
|
db.tables.create("test", {
|
15
13
|
columns: [
|
16
|
-
{name:
|
17
|
-
{name:
|
14
|
+
{name: 'id', type: :int, autoincr: true, primarykey: true},
|
15
|
+
{name: 'text', type: :varchar},
|
16
|
+
{name: 'number', type: :int, default: 0},
|
17
|
+
{name: 'float', type: :float, default: 0.0}
|
18
18
|
]
|
19
19
|
})
|
20
20
|
db.tables[:test]
|
21
|
-
|
21
|
+
end
|
22
22
|
|
23
23
|
before do
|
24
24
|
driver.before
|
@@ -88,6 +88,22 @@ shared_examples_for "a baza driver" do
|
|
88
88
|
raise "Block with should have ran too little: #{block_ran}." if block_ran < rows_count
|
89
89
|
end
|
90
90
|
|
91
|
+
it 'does unbuffered queries' do
|
92
|
+
test_table
|
93
|
+
|
94
|
+
10.times do |count|
|
95
|
+
db.insert(:test, text: "Test #{count}")
|
96
|
+
end
|
97
|
+
|
98
|
+
count_results = 0
|
99
|
+
db.q("SELECT * FROM test", type: :unbuffered) do |row|
|
100
|
+
expect(row[:text]).to eq "Test #{count_results}"
|
101
|
+
count_results += 1
|
102
|
+
end
|
103
|
+
|
104
|
+
expect(count_results).to eq 10
|
105
|
+
end
|
106
|
+
|
91
107
|
it "should do upserting" do
|
92
108
|
test_table.create_columns([{name: "nickname", type: :varchar}])
|
93
109
|
|
@@ -181,7 +197,10 @@ shared_examples_for "a baza driver" do
|
|
181
197
|
end
|
182
198
|
|
183
199
|
it "should be able to make new connections based on given objects" do
|
184
|
-
|
200
|
+
# Mysql doesn't support it...
|
201
|
+
unless db.opts.fetch(:type) == :mysql
|
202
|
+
new_db = Baza::Db.from_object(object: db.conn.conn)
|
203
|
+
end
|
185
204
|
end
|
186
205
|
|
187
206
|
it "should be able to do ID-queries through the select-method" do
|
@@ -204,51 +223,56 @@ shared_examples_for "a baza driver" do
|
|
204
223
|
end
|
205
224
|
|
206
225
|
count_found = 0
|
207
|
-
db.select(:test_table, nil, :
|
226
|
+
db.select(:test_table, nil, idquery: :idrow) do |row|
|
208
227
|
count_found += 1
|
209
228
|
|
210
229
|
row[:name].should eq "Kasper #{count_found}"
|
211
230
|
end
|
212
231
|
|
213
|
-
count_found.
|
232
|
+
expect(count_found).to eq 10000
|
214
233
|
end
|
215
234
|
|
216
235
|
it "should be able to use query buffers" do
|
217
236
|
db.tables.create(:test_table, {
|
218
|
-
:
|
219
|
-
{:
|
220
|
-
{:
|
237
|
+
columns: [
|
238
|
+
{name: :id, type: :int, autoincr: true, primarykey: true},
|
239
|
+
{name: :name, type: :varchar}
|
221
240
|
]
|
222
241
|
})
|
223
242
|
|
224
243
|
upsert = false
|
244
|
+
count_inserts = 0
|
225
245
|
db.q_buffer do |buffer|
|
226
246
|
2500.times do |count|
|
227
247
|
if upsert
|
228
|
-
buffer.upsert(:test_table, {:
|
248
|
+
buffer.upsert(:test_table, {name: "Kasper #{count}"}, {name: "Kasper #{count}"})
|
229
249
|
upsert = false
|
230
250
|
else
|
231
|
-
buffer.insert(:test_table, {:
|
251
|
+
buffer.insert(:test_table, {name: "Kasper #{count}"})
|
232
252
|
upsert = true
|
233
253
|
end
|
254
|
+
|
255
|
+
count_inserts += 1
|
234
256
|
end
|
235
257
|
end
|
236
258
|
|
259
|
+
expect(count_inserts).to eq 2500
|
260
|
+
|
237
261
|
test_table = db.tables[:test_table]
|
238
|
-
test_table.rows_count.
|
262
|
+
expect(test_table.rows_count).to eq 2500
|
239
263
|
|
264
|
+
count = 0
|
240
265
|
db.q_buffer do |buffer|
|
241
|
-
count = 0
|
242
266
|
upsert = false
|
243
267
|
|
244
|
-
db.select(:test_table, {}, :
|
245
|
-
row[:name].
|
268
|
+
db.select(:test_table, {}, orderby: :id) do |row|
|
269
|
+
expect(row[:name]).to eq "Kasper #{count}"
|
246
270
|
|
247
271
|
if upsert
|
248
|
-
buffer.upsert(:test_table, {name: "Kasper #{count}-#{count}"},
|
272
|
+
buffer.upsert(:test_table, {name: "Kasper #{count}-#{count}"}, id: row.fetch(:id))
|
249
273
|
upsert = false
|
250
274
|
else
|
251
|
-
buffer.update(:test_table, {name: "Kasper #{count}-#{count}"},
|
275
|
+
buffer.update(:test_table, {name: "Kasper #{count}-#{count}"}, id: row.fetch(:id))
|
252
276
|
upsert = true
|
253
277
|
end
|
254
278
|
|
@@ -256,14 +280,18 @@ shared_examples_for "a baza driver" do
|
|
256
280
|
end
|
257
281
|
end
|
258
282
|
|
283
|
+
expect(count).to eq 2500
|
284
|
+
|
259
285
|
count = 0
|
260
|
-
db.select(:test_table, {}, :
|
261
|
-
row[:name].
|
286
|
+
db.select(:test_table, {}, orderby: :id) do |row|
|
287
|
+
expect(row[:name]).to eq "Kasper #{count}-#{count}"
|
262
288
|
count += 1
|
263
289
|
end
|
264
290
|
|
291
|
+
expect(count).to eq 2500
|
292
|
+
|
265
293
|
#Test the flush-async which flushes transactions in a thread asyncronous.
|
266
|
-
db.q_buffer(:
|
294
|
+
db.q_buffer(flush_async: true) do |buffer|
|
267
295
|
count = 0
|
268
296
|
db.select(:test_table) do |row|
|
269
297
|
count += 1
|
@@ -272,7 +300,7 @@ shared_examples_for "a baza driver" do
|
|
272
300
|
time_start = Time.now.to_f
|
273
301
|
end
|
274
302
|
|
275
|
-
buffer.delete(:test_table,
|
303
|
+
buffer.delete(:test_table, id: row[:id])
|
276
304
|
|
277
305
|
if count == 1000
|
278
306
|
time_end = Time.now.to_f
|
@@ -283,6 +311,68 @@ shared_examples_for "a baza driver" do
|
|
283
311
|
end
|
284
312
|
end
|
285
313
|
|
286
|
-
test_table.rows_count.
|
314
|
+
expect(test_table.rows_count).to eq 0
|
315
|
+
end
|
316
|
+
|
317
|
+
describe 'results' do
|
318
|
+
before do
|
319
|
+
test_table.insert(text: 'test 1')
|
320
|
+
test_table.insert(text: 'test 2')
|
321
|
+
end
|
322
|
+
|
323
|
+
it '#to_a' do
|
324
|
+
array = db.select(:test).to_a
|
325
|
+
expect(array.length).to eq 2
|
326
|
+
end
|
327
|
+
|
328
|
+
it '#to_a_enum' do
|
329
|
+
array_enum = db.select(:test).to_a_enum
|
330
|
+
count = 0
|
331
|
+
array_enum.each { count += 1 }
|
332
|
+
expect(count).to eq 2
|
333
|
+
expect(array_enum.length).to eq 2
|
334
|
+
end
|
335
|
+
|
336
|
+
it '#to_enum' do
|
337
|
+
enum = db.select(:test).to_enum
|
338
|
+
|
339
|
+
count = 0
|
340
|
+
enum.each { count += 1 }
|
341
|
+
expect(count).to eq 2
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
it 'counts' do
|
346
|
+
test_table.insert(text: 'test 1')
|
347
|
+
expect(db.count(:test, text: 'test 1')).to eq 1
|
348
|
+
end
|
349
|
+
|
350
|
+
it 'doesnt do type translation by default' do
|
351
|
+
expect(row.fetch(:text).class).to eq String
|
352
|
+
expect(row.fetch(:number).class).to eq String
|
353
|
+
expect(row.fetch(:float).class).to eq String
|
354
|
+
end
|
355
|
+
|
356
|
+
it 'does type translation' do
|
357
|
+
db_with_type_translation.tables.create(:test, {
|
358
|
+
columns: [
|
359
|
+
{name: "id", type: :int, autoincr: true, primarykey: true},
|
360
|
+
{name: "text", type: :varchar},
|
361
|
+
{name: 'number', type: :int},
|
362
|
+
{name: 'float', type: :float},
|
363
|
+
{name: 'created_at', type: :datetime},
|
364
|
+
{name: 'date', type: :date}
|
365
|
+
]
|
366
|
+
})
|
367
|
+
|
368
|
+
db_with_type_translation.insert(:test, text: 'Kasper', number: 30, float: 4.5, created_at: Time.now, date: Date.new(2015, 06, 17))
|
369
|
+
|
370
|
+
row = db_with_type_translation.select(:test, text: 'Kasper').fetch
|
371
|
+
|
372
|
+
expect(row.fetch(:text).class).to eq String
|
373
|
+
expect(row.fetch(:number).class).to eq Fixnum
|
374
|
+
expect(row.fetch(:float).class).to eq Float
|
375
|
+
expect(row.fetch(:created_at).class).to eq Time
|
376
|
+
expect(row.fetch(:date).class).to eq Date
|
287
377
|
end
|
288
378
|
end
|
@@ -1,11 +1,4 @@
|
|
1
1
|
shared_examples_for "a baza columns driver" do
|
2
|
-
let(:constant){
|
3
|
-
name = described_class.name.split("::").last
|
4
|
-
const_name = "Info#{name.slice(0, 1).upcase}#{name.slice(1, name.length)}"
|
5
|
-
require "#{File.dirname(__FILE__)}/../info_#{StringCases.camel_to_snake(name)}"
|
6
|
-
raise "Constant was not defined: '#{const_name}'." unless Baza.const_defined?(const_name)
|
7
|
-
Baza.const_get(const_name)
|
8
|
-
}
|
9
2
|
let(:driver){ constant.new }
|
10
3
|
let(:db){ driver.db }
|
11
4
|
let(:test_table){
|
@@ -1,14 +1,7 @@
|
|
1
1
|
shared_examples_for "a baza indexes driver" do
|
2
|
-
let(:
|
3
|
-
|
4
|
-
|
5
|
-
require "#{File.dirname(__FILE__)}/../info_#{StringCases.camel_to_snake(name)}"
|
6
|
-
raise "Constant was not defined: '#{const_name}'." unless Baza.const_defined?(const_name)
|
7
|
-
Baza.const_get(const_name)
|
8
|
-
}
|
9
|
-
let(:driver){ constant.new }
|
10
|
-
let(:db){ driver.db }
|
11
|
-
let(:test_table){
|
2
|
+
let(:driver) { constant.new }
|
3
|
+
let(:db) { driver.db }
|
4
|
+
let(:test_table) do
|
12
5
|
db.tables.create("test", {
|
13
6
|
columns: [
|
14
7
|
{name: "id", type: :int, autoincr: true, primarykey: true},
|
@@ -21,7 +14,7 @@ shared_examples_for "a baza indexes driver" do
|
|
21
14
|
]
|
22
15
|
})
|
23
16
|
db.tables[:test]
|
24
|
-
|
17
|
+
end
|
25
18
|
|
26
19
|
before do
|
27
20
|
driver.before
|
@@ -1,11 +1,4 @@
|
|
1
1
|
shared_examples_for "a baza tables driver" do
|
2
|
-
let(:constant){
|
3
|
-
name = described_class.name.split("::").last
|
4
|
-
const_name = "Info#{name.slice(0, 1).upcase}#{name.slice(1, name.length)}"
|
5
|
-
require "#{File.dirname(__FILE__)}/../info_#{StringCases.camel_to_snake(name)}"
|
6
|
-
raise "Constant was not defined: '#{const_name}'." unless Baza.const_defined?(const_name)
|
7
|
-
Baza.const_get(const_name)
|
8
|
-
}
|
9
2
|
let(:driver){ constant.new }
|
10
3
|
let(:driver2){ constant.new }
|
11
4
|
let(:db){ driver.db }
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: datet
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.10
|
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.10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: string-cases
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,62 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: jdbc-sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: jdbc-mysql
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: activerecord-jdbc-adapter
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
139
195
|
- !ruby/object:Gem::Dependency
|
140
196
|
name: sqlite3
|
141
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +206,20 @@ dependencies:
|
|
150
206
|
- - ">="
|
151
207
|
- !ruby/object:Gem::Version
|
152
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: mysql
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
153
223
|
- !ruby/object:Gem::Dependency
|
154
224
|
name: mysql2
|
155
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,56 +265,94 @@ files:
|
|
195
265
|
- Rakefile
|
196
266
|
- VERSION
|
197
267
|
- baza.gemspec
|
198
|
-
- include/cloner.rb
|
199
|
-
- include/column.rb
|
200
|
-
- include/db.rb
|
201
|
-
- include/dbtime.rb
|
202
|
-
- include/driver.rb
|
203
|
-
- include/drivers/active_record/active_record.rb
|
204
|
-
- include/drivers/mysql/mysql.rb
|
205
|
-
- include/drivers/mysql/mysql_column.rb
|
206
|
-
- include/drivers/mysql/mysql_columns.rb
|
207
|
-
- include/drivers/mysql/mysql_index.rb
|
208
|
-
- include/drivers/mysql/mysql_indexes.rb
|
209
|
-
- include/drivers/mysql/mysql_result.rb
|
210
|
-
- include/drivers/mysql/mysql_result_java.rb
|
211
|
-
- include/drivers/mysql/mysql_result_mysql2.rb
|
212
|
-
- include/drivers/mysql/mysql_result_unbuffered.rb
|
213
|
-
- include/drivers/mysql/mysql_sqlspecs.rb
|
214
|
-
- include/drivers/mysql/mysql_table.rb
|
215
|
-
- include/drivers/mysql/mysql_tables.rb
|
216
|
-
- include/drivers/sqlite3/sqlite3.rb
|
217
|
-
- include/drivers/sqlite3/sqlite3_column.rb
|
218
|
-
- include/drivers/sqlite3/sqlite3_columns.rb
|
219
|
-
- include/drivers/sqlite3/sqlite3_index.rb
|
220
|
-
- include/drivers/sqlite3/sqlite3_indexes.rb
|
221
|
-
- include/drivers/sqlite3/sqlite3_result.rb
|
222
|
-
- include/drivers/sqlite3/sqlite3_result_java.rb
|
223
|
-
- include/drivers/sqlite3/sqlite3_sqlspecs.rb
|
224
|
-
- include/drivers/sqlite3/sqlite3_table.rb
|
225
|
-
- include/drivers/sqlite3/sqlite3_tables.rb
|
226
|
-
- include/dump.rb
|
227
|
-
- include/errors.rb
|
228
|
-
- include/idquery.rb
|
229
|
-
- include/index.rb
|
230
|
-
- include/model.rb
|
231
|
-
- include/model_custom.rb
|
232
|
-
- include/model_handler.rb
|
233
|
-
- include/model_handler_sqlhelper.rb
|
234
|
-
- include/query_buffer.rb
|
235
|
-
- include/revision.rb
|
236
|
-
- include/row.rb
|
237
|
-
- include/sqlspecs.rb
|
238
|
-
- include/table.rb
|
239
268
|
- lib/baza.rb
|
269
|
+
- lib/baza/base_sql_driver.rb
|
270
|
+
- lib/baza/cloner.rb
|
271
|
+
- lib/baza/column.rb
|
272
|
+
- lib/baza/db.rb
|
273
|
+
- lib/baza/dbtime.rb
|
274
|
+
- lib/baza/driver.rb
|
275
|
+
- lib/baza/drivers/active_record.rb
|
276
|
+
- lib/baza/drivers/active_record/columns.rb
|
277
|
+
- lib/baza/drivers/active_record/indexes.rb
|
278
|
+
- lib/baza/drivers/active_record/result.rb
|
279
|
+
- lib/baza/drivers/active_record/tables.rb
|
280
|
+
- lib/baza/drivers/mysql.rb
|
281
|
+
- lib/baza/drivers/mysql/column.rb
|
282
|
+
- lib/baza/drivers/mysql/columns.rb
|
283
|
+
- lib/baza/drivers/mysql/index.rb
|
284
|
+
- lib/baza/drivers/mysql/indexes.rb
|
285
|
+
- lib/baza/drivers/mysql/result.rb
|
286
|
+
- lib/baza/drivers/mysql/sqlspecs.rb
|
287
|
+
- lib/baza/drivers/mysql/table.rb
|
288
|
+
- lib/baza/drivers/mysql/tables.rb
|
289
|
+
- lib/baza/drivers/mysql/unbuffered_result.rb
|
290
|
+
- lib/baza/drivers/mysql2.rb
|
291
|
+
- lib/baza/drivers/mysql2/column.rb
|
292
|
+
- lib/baza/drivers/mysql2/columns.rb
|
293
|
+
- lib/baza/drivers/mysql2/index.rb
|
294
|
+
- lib/baza/drivers/mysql2/indexes.rb
|
295
|
+
- lib/baza/drivers/mysql2/result.rb
|
296
|
+
- lib/baza/drivers/mysql2/table.rb
|
297
|
+
- lib/baza/drivers/mysql2/tables.rb
|
298
|
+
- lib/baza/drivers/mysql_java.rb
|
299
|
+
- lib/baza/drivers/mysql_java/column.rb
|
300
|
+
- lib/baza/drivers/mysql_java/columns.rb
|
301
|
+
- lib/baza/drivers/mysql_java/index.rb
|
302
|
+
- lib/baza/drivers/mysql_java/indexes.rb
|
303
|
+
- lib/baza/drivers/mysql_java/table.rb
|
304
|
+
- lib/baza/drivers/mysql_java/tables.rb
|
305
|
+
- lib/baza/drivers/sqlite3.rb
|
306
|
+
- lib/baza/drivers/sqlite3/column.rb
|
307
|
+
- lib/baza/drivers/sqlite3/columns.rb
|
308
|
+
- lib/baza/drivers/sqlite3/index.rb
|
309
|
+
- lib/baza/drivers/sqlite3/indexes.rb
|
310
|
+
- lib/baza/drivers/sqlite3/result.rb
|
311
|
+
- lib/baza/drivers/sqlite3/sqlspecs.rb
|
312
|
+
- lib/baza/drivers/sqlite3/table.rb
|
313
|
+
- lib/baza/drivers/sqlite3/tables.rb
|
314
|
+
- lib/baza/drivers/sqlite3/unbuffered_result.rb
|
315
|
+
- lib/baza/drivers/sqlite3_java.rb
|
316
|
+
- lib/baza/drivers/sqlite3_java/column.rb
|
317
|
+
- lib/baza/drivers/sqlite3_java/columns.rb
|
318
|
+
- lib/baza/drivers/sqlite3_java/index.rb
|
319
|
+
- lib/baza/drivers/sqlite3_java/indexes.rb
|
320
|
+
- lib/baza/drivers/sqlite3_java/table.rb
|
321
|
+
- lib/baza/drivers/sqlite3_java/tables.rb
|
322
|
+
- lib/baza/drivers/sqlite3_java/unbuffered_result.rb
|
323
|
+
- lib/baza/drivers/sqlite3_rhodes.rb
|
324
|
+
- lib/baza/dump.rb
|
325
|
+
- lib/baza/errors.rb
|
326
|
+
- lib/baza/idquery.rb
|
327
|
+
- lib/baza/index.rb
|
328
|
+
- lib/baza/jdbc_driver.rb
|
329
|
+
- lib/baza/jdbc_result.rb
|
330
|
+
- lib/baza/model.rb
|
331
|
+
- lib/baza/model_custom.rb
|
332
|
+
- lib/baza/model_handler.rb
|
333
|
+
- lib/baza/model_handler_sqlhelper.rb
|
334
|
+
- lib/baza/query_buffer.rb
|
335
|
+
- lib/baza/result_base.rb
|
336
|
+
- lib/baza/revision.rb
|
337
|
+
- lib/baza/row.rb
|
338
|
+
- lib/baza/sqlspecs.rb
|
339
|
+
- lib/baza/table.rb
|
240
340
|
- shippable.yml
|
241
|
-
- spec/
|
242
|
-
- spec/
|
243
|
-
- spec/
|
244
|
-
- spec/
|
245
|
-
- spec/
|
341
|
+
- spec/cloner_spec.rb
|
342
|
+
- spec/drivers/active_record_mysql2_spec.rb
|
343
|
+
- spec/drivers/active_record_mysql_spec.rb
|
344
|
+
- spec/drivers/active_record_sqlite3_spec.rb
|
345
|
+
- spec/drivers/mysql2_spec.rb
|
346
|
+
- spec/drivers/mysql_spec.rb
|
347
|
+
- spec/drivers/sqlite3_spec.rb
|
246
348
|
- spec/info_active_record_example.rb
|
247
|
-
- spec/
|
349
|
+
- spec/info_active_record_mysql.rb
|
350
|
+
- spec/info_active_record_mysql2.rb
|
351
|
+
- spec/info_active_record_mysql2_shippable.rb
|
352
|
+
- spec/info_active_record_mysql_shippable.rb
|
353
|
+
- spec/info_active_record_sqlite3.rb
|
354
|
+
- spec/info_mysql2_example.rb
|
355
|
+
- spec/info_mysql2_shippable.rb
|
248
356
|
- spec/info_mysql_example.rb
|
249
357
|
- spec/info_mysql_shippable.rb
|
250
358
|
- spec/info_sqlite3.rb
|
@@ -274,7 +382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
382
|
version: '0'
|
275
383
|
requirements: []
|
276
384
|
rubyforge_project:
|
277
|
-
rubygems_version: 2.
|
385
|
+
rubygems_version: 2.4.0
|
278
386
|
signing_key:
|
279
387
|
specification_version: 4
|
280
388
|
summary: A database abstraction layer, model framework and database framework.
|