Class: Sneaql::Core::Commands::SneaqlRecordsetFromQuery
- Inherits:
-
SneaqlCommand
- Object
- SneaqlCommand
- Sneaql::Core::Commands::SneaqlRecordsetFromQuery
- Defined in:
- lib/sneaql_lib/core.rb
Overview
runs the query then stores the array of hashes into the recordset hash
Instance Method Summary collapse
- #action(recordset_name) ⇒ Object
-
#arg_definition ⇒ Object
argument types.
-
#query_results ⇒ Array
Returns array of hashes from SQL results.
Methods inherited from SneaqlCommand
#initialize, #valid_expression?, #valid_operator?, #valid_recordset?, #valid_symbol?, #valid_variable?, #validate_args
Constructor Details
This class inherits a constructor from Sneaql::Core::SneaqlCommand
Instance Method Details
#action(recordset_name) ⇒ Object
232 233 234 235 236 237 238 |
# File 'lib/sneaql_lib/core.rb', line 232 def action(recordset_name) r = query_results @logger.info "adding #{r.length} recs as #{recordset_name}" @recordset_manager.store_recordset(recordset_name, r) rescue => e @exception_manager.pending_error = e end |
#arg_definition ⇒ Object
argument types
241 242 243 |
# File 'lib/sneaql_lib/core.rb', line 241 def arg_definition [:recordset] end |
#query_results ⇒ Array
Returns array of hashes from SQL results
246 247 248 249 250 251 252 |
# File 'lib/sneaql_lib/core.rb', line 246 def query_results JDBCHelpers::QueryResultsToArray.new( @jdbc_connection, @statement, @logger ).results end |