Class: Telnyx::Resources::Storage::Sqldbs::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/storage/sqldbs/actions.rb,
sig/telnyx/resources/storage/sqldbs/actions.rbs

Overview

Manage SQL databases and run SQL against them

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Actions

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Actions.

Parameters:



43
44
45
# File 'lib/telnyx/resources/storage/sqldbs/actions.rb', line 43

def initialize(client:)
  @client = client
end

Instance Method Details

#query(id, sql:, params: nil, request_options: {}) ⇒ Telnyx::Models::Storage::Sqldbs::ActionQueryResponse

Some parameter documentations has been truncated, see Models::Storage::Sqldbs::ActionQueryParams for more details.

Runs SQL against the database and returns the resulting rows — empty for statements that return none, such as DDL. Bind positional ? placeholders with params rather than interpolating values into the SQL string.

Parameters:

  • id (String)

    SQL database ID

  • sql (String)

    The SQL to run. Use positional ? placeholders and supply the values in `params

  • params (Array<String, Float, Boolean, nil>)

    Positional bind parameters, in placeholder order. Each value is a string, a numb

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
# File 'lib/telnyx/resources/storage/sqldbs/actions.rb', line 29

def query(id, params)
  parsed, options = Telnyx::Storage::Sqldbs::ActionQueryParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["storage/sqldbs/%1$s/actions/query", id],
    body: parsed,
    model: Telnyx::Models::Storage::Sqldbs::ActionQueryResponse,
    options: options
  )
end