lsql-csv-0.1.0.3: A tool for CSV files data querying from the shell with short queries.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lsql.Csv.Core.BlockOps

Description

This module contains the Block definition and functions for getting specific types of blocks from the list of Block.

Synopsis

Documentation

data Block Source #

This data structure represents parsed blocks

Constructors

Select [Arg] 
If Arg 
Sort [Arg] 
By [Arg] 

getSelects :: [Block] -> [[Arg]] Source #

Returns all selects blocks

getIf :: [Block] -> Arg Source #

Makes conjunction of all if blocks (if none, simple True is returned) and returns it

getSort :: [Block] -> [Arg] Source #

Finds sort block, if exists, and returns it. If there is non, [] is returned. If there is more than one sort block, fails.

getBy :: [Block] -> [Arg] Source #

Finds by block, if exists, and returns it. If there is non, [] is returned. If there is more than one by block, fails.