A struct returned as result from queries.
It has two fields:
:num_rows- the number of rows returned, if returned by the database:data- a private field that stores the returnedAdbc.Columns. Useto_columns/1to convert to a public format
Summary
Functions
Load an Adbc.Result from in-memory IPC stream data.
Same as from_ipc_stream/1 but raises on error.
Consumes Arrow data from a Python object that implements the ArrowStream Export interface.
Same as from_py/1 but raises on error.
materialize/1 converts the result set's data from reference type to regular Elixir terms.
Returns a map of columns as Adbc.Column without materializing them.
Returns a map of columns as a result.
Types
@type t() :: %Adbc.Result{data: [Adbc.Column.t()], num_rows: non_neg_integer() | nil}
Functions
@spec from_ipc_stream(binary()) :: {:ok, t()} | {:error, Adbc.Error.t()}
Load an Adbc.Result from in-memory IPC stream data.
Same as from_ipc_stream/1 but raises on error.
Consumes Arrow data from a Python object that implements the ArrowStream Export interface.
The interface is typically implemented for dataframe objects, including ones from Pandas and Polars.
It returns an ok-tuple with Adbc.Result or an error-tuple.
You often want to call Adbc.Result.materialize/1 or
Adbc.Result.to_map/1 on the results to consume it.
Same as from_py/1 but raises on error.
@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.
Returns a map of columns as Adbc.Column without materializing them.
Returns a map of columns as a result.