kit 0.1.0 → 0.1.1

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 (2) hide show
  1. data/lib/kit/db_sqlite3.rb +2 -3
  2. metadata +3 -3
@@ -131,7 +131,7 @@ class Backend < Kit
131
131
  # @param [Symbol] table what database table to query
132
132
  # @param [Array] fields list of column names to return
133
133
  # @param [Integer] id rowid of record to return
134
- # @return [Array] hash for each returned row with a key for each requested field
134
+ # @return [Hash] first matched row with a key for each requested field
135
135
  def select_info_by_id table, fields, id
136
136
  info = @info_db.select fields, "FROM `#{table}` WHERE `rowid` = '#{id}'"
137
137
  info.first
@@ -151,7 +151,7 @@ class Backend < Kit
151
151
  # @param table (see #select_info_by_id)
152
152
  # @param fields (see #select_info_by_id)
153
153
  # @param [Hash] criteria key / value pairs required to match
154
- # @return (see #select_info_by_id)
154
+ # @return [Array] hash for each returned row with a key for each requested field
155
155
  def select_info_by_criteria table, fields, criteria
156
156
  q = []
157
157
  criteria.each do |key, value|
@@ -159,7 +159,6 @@ class Backend < Kit
159
159
  end
160
160
 
161
161
  info = @info_db.select fields, "FROM `#{table}` WHERE #{q.join " AND "}"
162
- info.first
163
162
  end
164
163
 
165
164
  # Inserts a new row into an info table.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Evan Boyd Sosenko
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-05-13 00:00:00 -07:00
17
+ date: 2011-08-06 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency