queryparser-hive-0.1.0.1: Parsing for Hive SQL queries

Safe HaskellNone
LanguageHaskell2010

Database.Sql.Hive.Parser

Synopsis

Documentation

parse :: Text -> Either ParseError (HiveStatement RawNames Range) Source #

parse consumes a statement, or fails

parseAll :: Text -> Either ParseError (HiveStatement RawNames Range) Source #

parseAll consumes all input as a single statement, or fails

parseMany :: Text -> Either ParseError [HiveStatement RawNames Range] Source #

parseMany consumes multiple statements, or fails

parseManyAll :: Text -> Either ParseError [HiveStatement RawNames Range] Source #

parseManyAll consumes all input multiple statements, or fails

parseManyEithers :: Text -> Either ParseError [Either (Unparsed Range) (HiveStatement RawNames Range)] Source #

parseManyEithers consumes all input as multiple (statements or failures) it should never fail

data CreateTablePrefix r a Source #

Instances

ConstrainSASNames Functor r => Functor (CreateTablePrefix r) Source # 

Methods

fmap :: (a -> b) -> CreateTablePrefix r a -> CreateTablePrefix r b #

(<$) :: a -> CreateTablePrefix r b -> CreateTablePrefix r a #

ConstrainSASNames Foldable r => Foldable (CreateTablePrefix r) Source # 

Methods

fold :: Monoid m => CreateTablePrefix r m -> m #

foldMap :: Monoid m => (a -> m) -> CreateTablePrefix r a -> m #

foldr :: (a -> b -> b) -> b -> CreateTablePrefix r a -> b #

foldr' :: (a -> b -> b) -> b -> CreateTablePrefix r a -> b #

foldl :: (b -> a -> b) -> b -> CreateTablePrefix r a -> b #

foldl' :: (b -> a -> b) -> b -> CreateTablePrefix r a -> b #

foldr1 :: (a -> a -> a) -> CreateTablePrefix r a -> a #

foldl1 :: (a -> a -> a) -> CreateTablePrefix r a -> a #

toList :: CreateTablePrefix r a -> [a] #

null :: CreateTablePrefix r a -> Bool #

length :: CreateTablePrefix r a -> Int #

elem :: Eq a => a -> CreateTablePrefix r a -> Bool #

maximum :: Ord a => CreateTablePrefix r a -> a #

minimum :: Ord a => CreateTablePrefix r a -> a #

sum :: Num a => CreateTablePrefix r a -> a #

product :: Num a => CreateTablePrefix r a -> a #

ConstrainSASNames Traversable r => Traversable (CreateTablePrefix r) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> CreateTablePrefix r a -> f (CreateTablePrefix r b) #

sequenceA :: Applicative f => CreateTablePrefix r (f a) -> f (CreateTablePrefix r a) #

mapM :: Monad m => (a -> m b) -> CreateTablePrefix r a -> m (CreateTablePrefix r b) #

sequence :: Monad m => CreateTablePrefix r (m a) -> m (CreateTablePrefix r a) #

ConstrainSNames Eq r a => Eq (CreateTablePrefix r a) Source # 
ConstrainSNames Show r a => Show (CreateTablePrefix r a) Source # 

selectClusterP :: Parser () Source #

selectClusterP parses for either clusterby or distributeby/sortby T478023 - implement clusterby in select datatype

checkTableNameInScopeP :: Text -> Parser () Source #

The columnName parser has been overhauled with checks for table names. If a scope is present (i.e. in a select statement), the table name must be a member of the tableAlias list for the parser to succeed. Otherwise, the table parser fails and execution tries the next parser choice.

Should the scope not be set, e.g. when selectP is performing lookahead to build scope, this check is skipped.

mkBinOp :: (Text, a) -> Expr r a -> Expr r a -> Expr r a Source #