lsql-csv-0.1.0.5: 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 representing a command block and functions for getting a specific type of blocks from a list of Block.

Synopsis

Documentation

data Block Source #

This data structure represents a command block.

Constructors

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

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

Returns all select 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 a sort block, if exists, and returns it. If there is none, [] is returned. If there is more than one sort block, fails.

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

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