prestige v2.0.0 Prestige View Source

An elixir client for Prestodb.

Link to this section Summary

Link to this section Types

Link to this type

query_opts()

View Source
query_opts() :: [{:name, String.t()}]
Link to this type

transaction_return()

View Source
transaction_return() ::
  :commit | {:commit, term()} | :rollback | {:rollback, term()}

Link to this section Functions

Link to this function

close(session, name)

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

close!(session, name)

View Source
close!(session :: Prestige.Session.t(), name :: String.t()) ::
  Prestige.Session.t()
Link to this function

execute(session, statement)

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

execute(session, name, args)

View Source
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
execute!(session :: Prestige.Session.t(), statement :: String.t()) ::
  Prestige.Result.t()
Link to this function

execute!(session, name, args)

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

See Prestige.Session.new/1.

Link to this function

prepare(session, name, statement)

View Source
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
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
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
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
stream!(
  session :: Prestige.Session.t(),
  statement :: String.t(),
  args :: list(),
  opts :: query_opts()
) :: Enumerable.t()
Link to this function

transaction(session, function)

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