graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Backends.BigQuery.ToQuery

Description

Convert the simple BigQuery AST to an SQL query, ready to be passed to the odbc package's query/exec functions.

Synopsis

Documentation

renderBuilderFlat :: Printer -> (Builder, InsOrdHashMap Int Value) Source #

Produces a query with holes, and a mapping for each

renderBuilderPretty :: Printer -> (Builder, InsOrdHashMap Int Value) Source #

Produces a query with holes, and a mapping for each

paramName :: Int -> Builder Source #

runBuilderFlat :: Printer -> State (InsOrdHashMap Value Int) Builder Source #

runBuilderPretty :: Printer -> State (InsOrdHashMap Value Int) Builder Source #

cleanProjections :: NonEmpty Projection -> NonEmpty Projection Source #

TODO: For now, we're littering this around where projections are built. I'd prefer to use ordered set, or else a newtype wrapper to prove it's been sorted. But that would interrupt code elsewhere. For now, this is an acceptable solution. Plus, a warning issued about duplicates might be useful.

Orphan instances

ToJSON Expression Source # 
Instance details

Methods

toJSON :: Expression -> Value

toEncoding :: Expression -> Encoding

toJSONList :: [Expression] -> Value

toEncodingList :: [Expression] -> Encoding