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
132 133 134 135 136 137 138 |
# File 'lib/plsql/connection.rb', line 132 def fetch_all rows = [] while (row = fetch) rows << row end rows end |
#fetch_hash ⇒ Object
Fetch row from cursor as hash => value, …
150 151 152 |
# File 'lib/plsql/connection.rb', line 150 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, …
141 142 143 144 145 146 147 |
# File 'lib/plsql/connection.rb', line 141 def fetch_hash_all rows = [] while (row = fetch_hash) rows << row end rows end |