View Source PgQuery (PgQuery v0.6.0)
Summary
Functions
Parses the binary statement stmt
into a Protobuf AST.
Parses the binary statement stmt
into a Protobuf AST.
Deparses the Protobuf AST parse_result
into a query string.
Deparses the Protobuf AST parse_result
into a query string.
Types
@type error() :: %{message: String.t(), cursorpos: non_neg_integer()}
Functions
@spec parse(String.t()) :: {:ok, %PgQuery.ParseResult{stmts: term(), version: term()}} | {:error, error()}
Parses the binary statement stmt
into a Protobuf AST.
Parses the binary statement stmt
into a Protobuf AST.
Raises if the statement is invalid.
@spec protobuf_to_query(%PgQuery.ParseResult{stmts: term(), version: term()}) :: {:ok, String.t()} | {:error, error()}
Deparses the Protobuf AST parse_result
into a query string.
@spec protobuf_to_query!(%PgQuery.ParseResult{stmts: term(), version: term()}) :: String.t() | no_return()
Deparses the Protobuf AST parse_result
into a query string.