midb 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/midb/server_model.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a61365a18572ed93ed1115447612d6f1f1463f5
4
- data.tar.gz: dbc56dd3cb04e326c2a12e23d887b28f9d389584
3
+ metadata.gz: 2e428c00026f3333fa8bb23fd7ce75bcff96a787
4
+ data.tar.gz: 0d753dcb1bd8d12d96b19f5f01cf05b143092646
5
5
  SHA512:
6
- metadata.gz: 88389b80d4ad740ea1bbf541dd2ee5fc54faf8e99de8266dc26d5350ae0bf1ca5a27bd4776eaef062e73c1040403ba63947899ebb368753f259c8d374b284514
7
- data.tar.gz: abc6f7ae590fc3013402739769f6a5f9252cab0c63483c93897931a825abda899d993fd75e01037babe1082cd619ca47c518d06bb82c7bed0102883f8ef4043f
6
+ metadata.gz: 07ab87e9c975ed55a6c86dbafec73de7a81691ab4d6fa8b218e8d7d72c871d0575b4634bf46f28fa26426d4d2c315749d31bebeb94f2333ce5be6d5ce77d4db0
7
+ data.tar.gz: cea9b182ee96b4ede9be33d1347c32bf8bad112249b0742449144019cfa551b71422d1e3399875fe07cfc32af6a244835b277a0d744a670176a3f25c49cc5cdc
@@ -65,7 +65,7 @@ module MIDB
65
65
  matching_field = match.split("->")[0]
66
66
  row_field = match.split("->")[1]
67
67
  fields[table].push matching_field
68
- if MIDB::ServerController.config["dbengine"] == "mysql"
68
+ if MIDB::ServerController.config["dbengine"] == :mysql
69
69
  inserts[table].push "(SELECT #{row_field} FROM #{main_table} WHERE id=(SELECT LAST_INSERT_ID()))"
70
70
  else
71
71
  inserts[table].push "(SELECT #{row_field} FROM #{main_table} WHERE id=(last_insert_rowid()))"
@@ -84,7 +84,7 @@ module MIDB
84
84
  # Find the ID to return in the response (only for the first query)
85
85
  queries.each do |q|
86
86
  results.push dbe.query(dblink, q)
87
- if MIDB::ServerController.config["dbengine"] == "mysql"
87
+ if MIDB::ServerController.config["dbengine"] == :mysql
88
88
  rid ||= dbe.extract(dbe.query(dblink, "SELECT id FROM #{main_table} WHERE id=(SELECT LAST_INSERT_ID());"), "id")
89
89
  else
90
90
  rid ||= dbe.extract(dbe.query(dblink, "SELECT id FROM #{main_table} WHERE id=(last_insert_rowid());"), "id")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - unrar