Module: PLSQL::Connection::CursorCommon
- Included in:
- JDBCConnection::Cursor, OCIConnection::Cursor
- Defined in:
- lib/plsql/connection.rb
Instance Method Summary collapse
-
#fetch_all ⇒ Object
Fetch all rows from cursor, each row as array of values.
-
#fetch_hash ⇒ Object
Fetch row from cursor as hash => value, ….
-
#fetch_hash_all ⇒ Object
Fetch all rows from cursor, each row as hash => value, ….
Instance Method Details
#fetch_all ⇒ Object
Fetch all rows from cursor, each row as array of values
159 160 161 162 163 164 165 |
# File 'lib/plsql/connection.rb', line 159 def fetch_all rows = [] while (row = fetch) rows << row end rows end |
#fetch_hash ⇒ Object
Fetch row from cursor as hash => value, …
177 178 179 |
# File 'lib/plsql/connection.rb', line 177 def fetch_hash (row = fetch) && ArrayHelpers::to_hash(fields, row) end |
#fetch_hash_all ⇒ Object
Fetch all rows from cursor, each row as hash => value, …
168 169 170 171 172 173 174 |
# File 'lib/plsql/connection.rb', line 168 def fetch_hash_all rows = [] while (row = fetch_hash) rows << row end rows end |