View Source Prestige (prestige v3.0.0)

An elixir client for Prestodb.

Link to this section Summary

Link to this section Types

@type query_opts() :: [{:name, String.t()}]
@type transaction_return() ::
  :commit | {:commit, term()} | :rollback | {:rollback, term()}

Link to this section Functions

@spec close(session :: Prestige.Session.t(), name :: String.t()) ::
  {:ok, Prestige.Session.t()} | {:error, term()}
@spec close!(session :: Prestige.Session.t(), name :: String.t()) ::
  Prestige.Session.t()
Link to this function

execute(session, statement)

View Source
@spec execute(session :: Prestige.Session.t(), statement :: String.t()) ::
  {:ok, Prestige.Result.t()} | {:error, term()}
Link to this function

execute(session, name, args)

View Source
@spec execute(session :: Prestige.Session.t(), name :: String.t(), args :: list()) ::
  {:ok, Prestige.Result.t()} | {:error, term()}
Link to this function

execute!(session, statement)

View Source
@spec execute!(session :: Prestige.Session.t(), statement :: String.t()) ::
  Prestige.Result.t()
Link to this function

execute!(session, name, args)

View Source
@spec execute!(session :: Prestige.Session.t(), name :: String.t(), args :: list()) ::
  Prestige.Result.t()
@spec new_session(keyword()) :: Prestige.Session.t()

See Prestige.Session.new/1.

Link to this function

prepare(session, name, statement)

View Source
@spec prepare(
  session :: Prestige.Session.t(),
  name :: String.t(),
  statement :: String.t()
) ::
  {:ok, Prestige.Session.t()} | {:error, term()}
Link to this function

prepare!(session, name, statement)

View Source
@spec prepare!(
  session :: Prestige.Session.t(),
  name :: String.t(),
  statement :: String.t()
) ::
  Prestige.Session.t()
Link to this function

query(session, statement, args \\ [], opts \\ [])

View Source
@spec query(
  session :: Prestige.Session.t(),
  statement :: String.t(),
  args :: list(),
  opts :: query_opts()
) :: {:ok, Prestige.Result.t()} | {:error, term()}
Link to this function

query!(session, statement, args \\ [], opts \\ [])

View Source
@spec query!(
  session :: Prestige.Session.t(),
  statement :: String.t(),
  args :: list(),
  opts :: query_opts()
) :: Prestige.Result.t()
Link to this function

stream!(session, statement, args \\ [], opts \\ [])

View Source
@spec stream!(
  session :: Prestige.Session.t(),
  statement :: String.t(),
  args :: list(),
  opts :: query_opts()
) :: Enumerable.t()
Link to this function

transaction(session, function)

View Source
@spec transaction(
  session :: Prestige.Session.t(),
  function :: (session :: Prestige.Session.t() -> transaction_return())
) :: term()