Class: SoqlDashboard::SoqlExecutor
- Inherits:
-
Object
- Object
- SoqlDashboard::SoqlExecutor
- Defined in:
- app/services/soql_dashboard/soql_executor.rb
Instance Method Summary collapse
- #call(query) ⇒ Object
-
#initialize(integration) ⇒ SoqlExecutor
constructor
A new instance of SoqlExecutor.
Constructor Details
#initialize(integration) ⇒ SoqlExecutor
Returns a new instance of SoqlExecutor.
5 6 7 8 |
# File 'app/services/soql_dashboard/soql_executor.rb', line 5 def initialize(integration) @integration = integration @config = integration.send(config_method_name) end |
Instance Method Details
#call(query) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/services/soql_dashboard/soql_executor.rb', line 10 def call(query) validate_query(query) api_client = SoqlDashboard::SalesforceApiClient.new(config) api_client.execute_query(query) rescue StandardError => e { error: e. } end |