lib/oci/nosql/nosql_client.rb
def prepare_statement(compartment_id, statement, opts = {})
      logger.debug 'Calling operation NosqlClient#prepare_statement.' if logger

      raise "Missing the required parameter 'compartment_id' when calling prepare_statement." if compartment_id.nil?
      raise "Missing the required parameter 'statement' when calling prepare_statement." if statement.nil?

      path = '/query/prepare'
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:statement] = statement

      # Header Params
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      # rubocop:enable Style/NegatedIf

      post_body = nil

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NosqlClient#prepare_statement') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Nosql::Models::PreparedStatement'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Prepare a SQL statement for use in a query with variable substitution.
#
# @param [String] compartment_id The ID of a table's compartment.
# @param [String] statement A NoSQL SQL statement.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :opc_request_id The client request ID for tracing.
# @return [Response] A Response object with data of type {OCI::Nosql::Models::PreparedStatement PreparedStatement}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/nosql/prepare_statement.rb.html) to see an example of how to use prepare_statement API.
Prepare a SQL statement for use in a query with variable substitution.
Prepare a SQL statement for use in a query with variable substitution .
def prepare_statement(compartment_id, statement, opts = {})
      logger.debug 'Calling operation NosqlClient#prepare_statement.' if logger
      raise "Missing the required parameter 'compartment_id' when calling prepare_statement." if compartment_id.nil?
      raise "Missing the required parameter 'statement' when calling prepare_statement." if statement.nil?
      path = '/query/prepare'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:statement] = statement
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NosqlClient#prepare_statement') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Nosql::Models::PreparedStatement'
        )
      end
    end
def prepare_statement ( compartment_id , statement , opts = { } ) logger . debug 'Calling operation NosqlClient#prepare_statement.' if logger raise "Missing the required parameter 'compartment_id' when calling prepare_statement." if compartment_id . nil? raise "Missing the required parameter 'statement' when calling prepare_statement." if statement . nil? path = '/query/prepare' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :statement ] = statement header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'NosqlClient#prepare_statement' ) do @api_client . call_api ( :GET , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Nosql::Models::PreparedStatement' ) end end
Prepare a SQL statement for use in a query with variable substitution.
Prepare a SQL statement for use in a query with variable substitution .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Nosql::Models::PreparedStatement PreparedStatement}
A Response object with data of type { OCI :: Nosql :: Models :: PreparedStatement PreparedStatement }
Response
compartment_id
statement
opts
:opc_request_id The client request ID for tracing.
: opc_request_id The client request ID for tracing .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use prepare_statement API.
Click [ here ] to see an example of how to use prepare_statement API .