Safe Haskell | None |
---|---|
Language | GHC2024 |
Synopsis
- parseSQL :: Data ast => Dialect -> (Dialect -> FilePath -> Text -> Either ParseErrors ast) -> (ast -> Either ParseErrors expr) -> Text -> FilePath -> Either Text expr
- parseDialectSQLStatement :: Dialect -> ParseSQLFun Query
- parseDialectSQLSExp :: Dialect -> ParseSQLFun SExp
- parseDialectSQLFrom :: Dialect -> ParseSQLFun From
- parseDialectSQLRelation :: Dialect -> ParseSQLFun (Alias Relation)
- parseDialectSQLSelExps :: Dialect -> ParseSQLFun [Alias SExp]
- data ParseExc
- notSupported :: HasCallStack => Text -> a
- badSyntax :: HasCallStack => Text -> a
- parsedAsQuery :: FilePath -> Statement -> Either ParseErrors Query
- convertAsStruct :: AsStruct -> Q ()
- convertSetQuantifier :: SetQuantifier -> Q ()
- setQuantifierToDistinctness :: SetQuantifier -> Maybe Distinctness
- convertQueryExpr :: QueryExpr -> Q ()
- convertSetQuantifierForSetOperatorName :: SetOperatorName -> SetQuantifier -> UnionType
- convertCorresponding :: Corresponding -> Q ()
- convertSelect :: [(ScalarExpr, Maybe Name)] -> Q [Ref SExp]
- convertFrom :: TableRef -> Q (Ref Relation)
- adaptTableOperator :: ParensOperator -> ParensOperator
- convertTableOperator :: Maybe ParensOperator -> Q ()
- convertWhere :: Maybe ScalarExpr -> Q ()
- convertGroupBy :: [GroupingExpr] -> Q ()
- convertHaving :: Maybe ScalarExpr -> Q ()
- convertGroupingExpr :: GroupingExpr -> SExp
- tableAsRelation :: TableRef -> Alias Relation
- idenNamesAsSExp :: [Name] -> Either ParseErrors SExp
- scalarExprAsSExp :: ScalarExpr -> Either ParseErrors SExp
- convertSortSpec :: SortSpec -> Either ParseErrors OrderPart
- convertOrderBy :: [SortSpec] -> Q ()
- convertOffset :: Maybe ScalarExpr -> Q ()
- convertFetchFirst :: Maybe ScalarExpr -> Q ()
- convertDirection :: Direction -> OrderDir
- convertNullsOrder :: NullsOrder -> Maybe NullOrder
- convertFrame :: Frame -> Either ParseErrors WindowFrame
- convertFrameRows :: FrameRows -> WindowFrameUnit
- convertFramePos :: FramePos -> Either ParseErrors FrameLength
- namesToRef :: forall {k} (a :: k). [Name] -> Ref a
- nameToRef :: forall {k} (a :: k). Name -> Ref a
- fromAstStr :: SrcLitStr -> Name
- parseFail :: FilePath -> String -> ParseErrors
- numericScalarExpr :: ScalarExpr -> Maybe Int
- convertType :: TypeName -> Type
- convertInPredValue :: InPredValue -> Either ParseErrors [SExp]
- convertIntervalTypeField :: IntervalTypeField -> DatePart
- prettyNames :: [Name] -> Text
- convertNullsRespect :: Maybe NullsRespect -> Maybe NullStrategy
- convertNullsRespectFunMod :: Maybe NullsRespect -> [FunModifier]
Documentation
parseSQL :: Data ast => Dialect -> (Dialect -> FilePath -> Text -> Either ParseErrors ast) -> (ast -> Either ParseErrors expr) -> Text -> FilePath -> Either Text expr #
parseDialectSQLSelExps :: Dialect -> ParseSQLFun [Alias SExp] #
Instances
notSupported :: HasCallStack => Text -> a #
badSyntax :: HasCallStack => Text -> a #
parsedAsQuery :: FilePath -> Statement -> Either ParseErrors Query #
Convert a SimpleSQL QueryExpr into a Napkin Query.
convertAsStruct :: AsStruct -> Q () #
convertSetQuantifier :: SetQuantifier -> Q () #
convertQueryExpr :: QueryExpr -> Q () #
convertCorresponding :: Corresponding -> Q () #
convertSelect :: [(ScalarExpr, Maybe Name)] -> Q [Ref SExp] #
convertTableOperator :: Maybe ParensOperator -> Q () #
convertWhere :: Maybe ScalarExpr -> Q () #
convertGroupBy :: [GroupingExpr] -> Q () #
convertHaving :: Maybe ScalarExpr -> Q () #
convertGroupingExpr :: GroupingExpr -> SExp #
tableAsRelation :: TableRef -> Alias Relation #
idenNamesAsSExp :: [Name] -> Either ParseErrors SExp #
scalarExprAsSExp :: ScalarExpr -> Either ParseErrors SExp #
Convert an SQL ScalarExpr to napkin's SExp
convertOrderBy :: [SortSpec] -> Q () #
convertOffset :: Maybe ScalarExpr -> Q () #
convertFetchFirst :: Maybe ScalarExpr -> Q () #
convertDirection :: Direction -> OrderDir #
namesToRef :: forall {k} (a :: k). [Name] -> Ref a #
fromAstStr :: SrcLitStr -> Name #
parseFail :: FilePath -> String -> ParseErrors #
numericScalarExpr :: ScalarExpr -> Maybe Int #
convertType :: TypeName -> Type #
convertInPredValue :: InPredValue -> Either ParseErrors [SExp] #
prettyNames :: [Name] -> Text #