View Source Adbc.Result (adbc v0.6.5)

A struct returned as result from queries.

It has two fields:

  • :data - a list of Adbc.Column

  • :num_rows - the number of rows returned, if returned by the database

Summary

Functions

materialize/1 converts the result set's data from reference type to regular Elixir terms.

Convert any list view in the result set to normal lists.

Returns a map of columns as a result.

Types

@type t() :: %Adbc.Result{
  data: [
    %Adbc.Column{
      data: term(),
      length: term(),
      metadata: term(),
      name: term(),
      nullable: term(),
      offset: term(),
      type: term()
    }
  ],
  num_rows: non_neg_integer() | nil
}

Functions

@spec materialize(
  %Adbc.Result{data: term(), num_rows: term()}
  | {:ok, %Adbc.Result{data: term(), num_rows: term()}}
  | {:error, String.t()}
) ::
  %Adbc.Result{data: term(), num_rows: term()}
  | {:ok, %Adbc.Result{data: term(), num_rows: term()}}
  | {:error, String.t()}

materialize/1 converts the result set's data from reference type to regular Elixir terms.

@spec to_list(%Adbc.Result{data: term(), num_rows: term()}) :: %Adbc.Result{
  data: term(),
  num_rows: term()
}

Convert any list view in the result set to normal lists.

Returns a map of columns as a result.