sql-words-0.1.6.5: SQL keywords data constructors into OverloadedString

Copyright | 2013 Kei Hibino
License | BSD3
Maintainer | ex8k.hibino@gmail.com
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.SQL.Keyword.Concat

Contents

- List concatenation functions
- Binary operators
- Unary operator

Description

Concatenations on `Keyword` types

Synopsis

- unwords' :: [Keyword] -> Keyword
- sepBy :: [Keyword] -> Keyword -> Keyword
- parenSepBy :: [Keyword] -> Keyword -> Keyword
- defineBinOp :: Keyword -> Keyword -> Keyword -> Keyword
- strBinOp :: (Keyword -> Keyword -> Keyword) -> String -> String -> String
- as :: Keyword -> Keyword -> Keyword
- (<.>) :: Keyword -> Keyword -> Keyword
- (|*|) :: Keyword -> Keyword -> Keyword
- (.||.) :: Keyword -> Keyword -> Keyword
- (.=.) :: Keyword -> Keyword -> Keyword
- (.<.) :: Keyword -> Keyword -> Keyword
- (.<=.) :: Keyword -> Keyword -> Keyword
- (.>.) :: Keyword -> Keyword -> Keyword
- (.>=.) :: Keyword -> Keyword -> Keyword
- (.<>.) :: Keyword -> Keyword -> Keyword
- and :: Keyword -> Keyword -> Keyword
- or :: Keyword -> Keyword -> Keyword
- in' :: Keyword -> Keyword -> Keyword
- (<++>) :: Keyword -> Keyword -> Keyword
- fold :: (Keyword -> Keyword -> Keyword) -> [Keyword] -> Keyword
- defineUniOp :: Keyword -> Keyword -> Keyword
- paren :: Keyword -> Keyword
- strUniOp :: (Keyword -> Keyword) -> String -> String

# List concatenation functions

Functions to concatenate `Keyword` list.

unwords' :: [Keyword] -> Keyword Source #

Concatenate `Keyword` list like unwords on `String` list.

sepBy :: [Keyword] -> Keyword -> Keyword Source #

Separate `Keyword` list with delimiter `Keyword` and concatenate into one `Keyword`.

parenSepBy :: [Keyword] -> Keyword -> Keyword Source #

Do `sepBy` and enclose by paren

# Binary operators

Binary operators on SQL. Result is concatenated into one `Keyword`.

defineBinOp :: Keyword -> Keyword -> Keyword -> Keyword Source #

Define binary operator on `Keyword` type. Result is delimited by whitespace like unwords on `String` list.

strBinOp :: (Keyword -> Keyword -> Keyword) -> String -> String -> String Source #

Define binary operator of string from `Keyword` binary operator.

as :: Keyword -> Keyword -> Keyword Source #

Binary operator for SQL name alias.

(<.>) :: Keyword -> Keyword -> Keyword Source #

Binary operator to create qualified name on SQL.

(|*|) :: Keyword -> Keyword -> Keyword infixr 1 Source #

Binary operator to create comma separated words.

(.||.) :: Keyword -> Keyword -> Keyword infixr 5 Source #

Binary operator for SQL string expression concatenation.

(.=.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary eq operator for SQL expression.

(.<.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary lt operator for SQL expression.

(.<=.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary le operator for SQL expression.

(.>.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary gt operator for SQL expression.

(.>=.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary ge operator for SQL expression.

(.<>.) :: Keyword -> Keyword -> Keyword infixr 4 Source #

Binary not eq operator for SQL expression.

and :: Keyword -> Keyword -> Keyword infixr 3 Source #

Binary `AND` operator for SQL boolean expression.

or :: Keyword -> Keyword -> Keyword infixr 2 Source #

Binary `OR` operator for SQL boolean expression.

in' :: Keyword -> Keyword -> Keyword infix 4 Source #

Binary `IN` operator for SQL.

(<++>) :: Keyword -> Keyword -> Keyword infixr 6 Source #

Directly concatenate SQL string without whitespaces.

fold Source #

Arguments

:: (Keyword -> Keyword -> Keyword) | Binary operator used in fold
-> [Keyword] | List to fold
-> Keyword | Result

Fold operation using binary operator with empty result of zero length case.

# Unary operator

defineUniOp :: Keyword -> Keyword -> Keyword Source #

Define unary operator on `Keyword` type represented by specified `Keyword`. Result is delimited by whitespace like unwords on `String` list.

paren :: Keyword -> Keyword Source #

Uni operator to create Parend words.

strUniOp :: (Keyword -> Keyword) -> String -> String Source #

Define uni operator of string from `Keyword` uni operator.