ExArrow.ADBC.ConnectionBehaviour behaviour (ex_arrow v0.6.0)

View Source

Behaviour for ADBC Connection implementations. Used with Mox in tests.

Summary

Callbacks

get_objects(connection, opts)

@callback get_objects(connection :: ExArrow.ADBC.Connection.t(), opts :: keyword()) ::
  {:ok, ExArrow.Stream.t()} | {:error, term()}

get_table_schema(connection, catalog, db_schema, table_name)

@callback get_table_schema(
  connection :: ExArrow.ADBC.Connection.t(),
  catalog :: String.t() | nil,
  db_schema :: String.t() | nil,
  table_name :: String.t()
) :: {:ok, ExArrow.Schema.t()} | {:error, term()}

get_table_types(connection)

@callback get_table_types(connection :: ExArrow.ADBC.Connection.t()) ::
  {:ok, ExArrow.Stream.t()} | {:error, term()}

open(database)

@callback open(database :: ExArrow.ADBC.Database.t()) ::
  {:ok, ExArrow.ADBC.Connection.t()} | {:error, term()}