Method: Pod4::TdsInterface#list
- Defined in:
- lib/pod4/tds_interface.rb
#list(selection = nil) ⇒ Object
Selection is a hash or something like it: keys should be field names. We return any records where the given fields equal the given values.
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/pod4/tds_interface.rb', line 132 def list(selection=nil) raise(Pod4::DatabaseError, 'selection parameter is not a hash') \ unless selection.nil? || selection.respond_to?(:keys) sql, vals = sql_select(nil, selection) select( sql_subst(sql, *vals.map{|v| quote v}) ) {|r| Octothorpe.new(r) } rescue => e handle_error(e) end |