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
157 158 159 160 161 162 163 |
# File 'lib/plsql/connection.rb', line 157 def fetch_all rows = [] while (row = fetch) rows << row end rows end |
#fetch_hash ⇒ Object
Fetch row from cursor as hash => value, …
175 176 177 |
# File 'lib/plsql/connection.rb', line 175 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, …
166 167 168 169 170 171 172 |
# File 'lib/plsql/connection.rb', line 166 def fetch_hash_all rows = [] while (row = fetch_hash) rows << row end rows end |