esqueleto-3.5.11.2: Type-safe EDSL for SQL queries on persistent backends.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Database.Esqueleto.Internal.ExprParser

Description

This is an internal module. This module may have breaking changes without a corresponding major version bump. If you use this module, please open an issue with your use-case so we can safely support it.

Synopsis

- data TableAccess = TableAccess {
  - tableAccessTable :: Text
  - tableAccessColumn :: Text
  }
- parseOnExpr :: SqlBackend -> Text -> Either String (Set TableAccess)
- mkEscapeChar :: SqlBackend -> Either String Char
- type ExprParser a = Char -> Parser a
- onExpr :: ExprParser (Set TableAccess)
- skipToEscape :: ExprParser ()
- parseEscapedIdentifier :: ExprParser [Char]
- parseTableAccess :: ExprParser TableAccess
- parseEscapedChars :: ExprParser [Char]

# Documentation

data TableAccess Source #

A type representing the access of a table value. In Esqueleto, we get a guarantee that the access will look something like:

    escape-char [character] escape-char . escape-char [character] escape-char
                ^^^^^^^^^^^                           ^^^^^^^^^^^
                table name                            column name

Constructors

TableAccess |

Fields

- tableAccessTable :: Text
- tableAccessColumn :: Text

#### Instances

Instances details

Show TableAccess Source # |
Instance details Defined in Database.Esqueleto.Internal.ExprParser Methods showsPrec :: Int -> TableAccess -> ShowS Source # show :: TableAccess -> String Source # showList :: [TableAccess] -> ShowS Source #
Eq TableAccess Source # |
Instance details Defined in Database.Esqueleto.Internal.ExprParser Methods (==) :: TableAccess -> TableAccess -> Bool Source # (/=) :: TableAccess -> TableAccess -> Bool Source #
Ord TableAccess Source # |

Instance details

Defined in Database.Esqueleto.Internal.ExprParser

Methods

compare :: TableAccess -> TableAccess -> Ordering Source #

(<) :: TableAccess -> TableAccess -> Bool Source #

(<=) :: TableAccess -> TableAccess -> Bool Source #

(>) :: TableAccess -> TableAccess -> Bool Source #

(>=) :: TableAccess -> TableAccess -> Bool Source #

max :: TableAccess -> TableAccess -> TableAccess Source #

min :: TableAccess -> TableAccess -> TableAccess Source #

parseOnExpr :: SqlBackend -> Text -> Either String (Set TableAccess) Source #

Parse a `SqlExpr (Value Bool)`'s textual representation into a list of `TableAccess`

mkEscapeChar :: SqlBackend -> Either String Char Source #

This function uses the `connEscapeName` function in the `SqlBackend` with an empty identifier to pull out an escape character. This implementation works with postgresql, mysql, and sqlite backends.

type ExprParser a = Char -> Parser a Source #

onExpr :: ExprParser (Set TableAccess) Source #

skipToEscape :: ExprParser () Source #

parseEscapedIdentifier :: ExprParser [Char] Source #

parseTableAccess :: ExprParser TableAccess Source #

parseEscapedChars :: ExprParser [Char] Source #