swiss_db 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/swiss_db/cursor.rb +7 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4566df7d0cf57f2b234c41c3d6422b83f80385c3
4
- data.tar.gz: 745d33640c3c028f2312a8ae2cdbe57664447e35
3
+ metadata.gz: 01e1d0c198065533e68a2417d669ce374b79ab3a
4
+ data.tar.gz: 42a742da3ffcd437106c950b4ead8d38cc0b1d1e
5
5
  SHA512:
6
- metadata.gz: d2f2ef4b40a7c083c48fa403c159f2d6f61af54e5a2097c841dc677b24e5b20dad0712676d6d95318cf71eb34b9ab18a2df6446759332bfb5d278ccc9062a7cf
7
- data.tar.gz: 6bde8c2b157c12710a6a00985e08341ecd9e4a751aadb8eed9c274972f2b01da19e950b9e010f04bcbf95caca80026d2d2941f6b59c23e15582ed7c7b186f483
6
+ metadata.gz: e8bfce38d280954975035fcf532ff8092d6bfe4b0438723aa00affdf251064bc607bb3c9e01e0cda5a590e8d98ad18344ab4ac3e7bdc441f7852ba3b85351c1f
7
+ data.tar.gz: 59edfad052f96f049c52534e7f5d2ccdee6ef87000aa6b8d5e0d65886f1596152eafb17a68089225565f1cf7ffdd45debd14405922c90434996fe08fe6fb79af
@@ -100,14 +100,17 @@ class Cursor
100
100
  type = cursor.getType(index)
101
101
  # puts "getting field #{method_name} at index #{index} of type #{type}"
102
102
 
103
- if type == FIELD_TYPE_STRING
104
- cursor.getString(index)
103
+ if type == FIELD_TYPE_STRING #also boolean
104
+ str = cursor.getString(index).to_s
105
+ str = true if str == "true"
106
+ str = false if str == "false"
107
+ str
105
108
  elsif type == FIELD_TYPE_INTEGER
106
- cursor.getInt(index)
109
+ cursor.getInt(index).to_i
107
110
  elsif type == FIELD_TYPE_NULL
108
111
  nil #??
109
112
  elsif type == FIELD_TYPE_FLOAT
110
- cursor.getFloat(index)
113
+ cursor.getFloat(index).to_f
111
114
  elsif type == FIELD_TYPE_BLOB
112
115
  cursor.getBlob(index)
113
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiss_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Silverman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-20 00:00:00.000000000 Z
11
+ date: 2015-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler