hydra-ext-0.18.0: src/main/haskell/Hydra/Ext/Sql/Syntax.hs
-- Note: this is an automatically generated file. Do not edit.
-- | A subset of ANSI SQL:2003, capturing selected productions of the BNF grammar provided at https://ronsavage.github.io/SQL/sql-2003-2.bnf.html, which is based on the Final Committee Draft (FCD) of ISO/IEC 9075-2:2003
module Hydra.Ext.Sql.Syntax where
import qualified Hydra.Core.Model as Model
import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, lines, map, pure, sum, unlines)
import qualified Data.Scientific as Sci
import Data.Void
-- | An approximate (floating-point) numeric literal, such as 1.5E10
newtype ApproximateNumericLiteral =
ApproximateNumericLiteral {
unApproximateNumericLiteral :: String}
deriving (Eq, Ord, Read, Show)
_ApproximateNumericLiteral = Model.Name "hydra.ext.sql.syntax.ApproximateNumericLiteral"
-- | An approximate numeric type: FLOAT, REAL, or DOUBLE PRECISION
data ApproximateNumericType =
ApproximateNumericTypeFloat (Maybe Precision) |
ApproximateNumericTypeReal |
ApproximateNumericTypeDouble
deriving (Eq, Ord, Read, Show)
_ApproximateNumericType = Model.Name "hydra.ext.sql.syntax.ApproximateNumericType"
_ApproximateNumericType_float = Model.Name "float"
_ApproximateNumericType_real = Model.Name "real"
_ApproximateNumericType_double = Model.Name "double"
-- | A single element of an array value
newtype ArrayElement =
ArrayElement {
unArrayElement :: ValueExpression}
deriving (Eq, Ord, Read, Show)
_ArrayElement = Model.Name "hydra.ext.sql.syntax.ArrayElement"
-- | A non-empty, comma-separated list of array elements
data ArrayElementList =
ArrayElementList {
arrayElementListFirst :: ArrayElement,
arrayElementListRest :: [ArrayElement]}
deriving (Eq, Ord, Read, Show)
_ArrayElementList = Model.Name "hydra.ext.sql.syntax.ArrayElementList"
_ArrayElementList_first = Model.Name "first"
_ArrayElementList_rest = Model.Name "rest"
-- | A reference to an element of an array by index
newtype ArrayElementReference =
ArrayElementReference {
unArrayElementReference :: ()}
deriving (Eq, Ord, Read, Show)
_ArrayElementReference = Model.Name "hydra.ext.sql.syntax.ArrayElementReference"
-- | An ARRAY collection type
newtype ArrayType =
ArrayType {
unArrayType :: ()}
deriving (Eq, Ord, Read, Show)
_ArrayType = Model.Name "hydra.ext.sql.syntax.ArrayType"
-- | A constructor for an array value, either by enumeration or by query
data ArrayValueConstructor =
ArrayValueConstructorEnumeration ArrayValueConstructorByEnumeration |
ArrayValueConstructorQuery ArrayValueConstructorByQuery
deriving (Eq, Ord, Read, Show)
_ArrayValueConstructor = Model.Name "hydra.ext.sql.syntax.ArrayValueConstructor"
_ArrayValueConstructor_enumeration = Model.Name "enumeration"
_ArrayValueConstructor_query = Model.Name "query"
-- | An array value constructed by explicitly enumerating its elements
data ArrayValueConstructorByEnumeration =
ArrayValueConstructorByEnumeration {
arrayValueConstructorByEnumerationLeftBracketOrTrigraph :: LeftBracketOrTrigraph,
arrayValueConstructorByEnumerationArrayElementList :: ArrayElementList,
arrayValueConstructorByEnumerationRightBracketOrTrigraph :: RightBracketOrTrigraph}
deriving (Eq, Ord, Read, Show)
_ArrayValueConstructorByEnumeration = Model.Name "hydra.ext.sql.syntax.ArrayValueConstructorByEnumeration"
_ArrayValueConstructorByEnumeration_LeftBracketOrTrigraph = Model.Name "LeftBracketOrTrigraph"
_ArrayValueConstructorByEnumeration_ArrayElementList = Model.Name "ArrayElementList"
_ArrayValueConstructorByEnumeration_RightBracketOrTrigraph = Model.Name "RightBracketOrTrigraph"
-- | An array value constructed from the result of a query
newtype ArrayValueConstructorByQuery =
ArrayValueConstructorByQuery {
unArrayValueConstructorByQuery :: ()}
deriving (Eq, Ord, Read, Show)
_ArrayValueConstructorByQuery = Model.Name "hydra.ext.sql.syntax.ArrayValueConstructorByQuery"
-- | An expression that evaluates to an array value
newtype ArrayValueExpression =
ArrayValueExpression {
unArrayValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_ArrayValueExpression = Model.Name "hydra.ext.sql.syntax.ArrayValueExpression"
-- | A clause introducing a table's contents as the result of a subquery
newtype AsSubqueryClause =
AsSubqueryClause {
unAsSubqueryClause :: ()}
deriving (Eq, Ord, Read, Show)
_AsSubqueryClause = Model.Name "hydra.ext.sql.syntax.AsSubqueryClause"
-- | A reference to an attribute or method of a structured value
newtype AttributeOrMethodReference =
AttributeOrMethodReference {
unAttributeOrMethodReference :: ()}
deriving (Eq, Ord, Read, Show)
_AttributeOrMethodReference = Model.Name "hydra.ext.sql.syntax.AttributeOrMethodReference"
-- | A binary large object string type: BINARY LARGE OBJECT or BLOB
data BinaryLargeObjectStringType =
BinaryLargeObjectStringTypeBinary (Maybe LargeObjectLength) |
BinaryLargeObjectStringTypeBlob (Maybe LargeObjectLength)
deriving (Eq, Ord, Read, Show)
_BinaryLargeObjectStringType = Model.Name "hydra.ext.sql.syntax.BinaryLargeObjectStringType"
_BinaryLargeObjectStringType_binary = Model.Name "binary"
_BinaryLargeObjectStringType_blob = Model.Name "blob"
-- | A binary string literal, e.g. X'FF00'
newtype BinaryStringLiteral =
BinaryStringLiteral {
unBinaryStringLiteral :: ()}
deriving (Eq, Ord, Read, Show)
_BinaryStringLiteral = Model.Name "hydra.ext.sql.syntax.BinaryStringLiteral"
-- | A boolean test, optionally negated with NOT
data BooleanFactor =
BooleanFactor {
booleanFactorNOT :: (Maybe ()),
booleanFactorBooleanTest :: BooleanTest}
deriving (Eq, Ord, Read, Show)
_BooleanFactor = Model.Name "hydra.ext.sql.syntax.BooleanFactor"
_BooleanFactor_NOT = Model.Name "NOT"
_BooleanFactor_BooleanTest = Model.Name "BooleanTest"
-- | A boolean literal: TRUE, FALSE, or UNKNOWN
data BooleanLiteral =
BooleanLiteralTRUE |
BooleanLiteralFALSE |
BooleanLiteralUNKNOWN
deriving (Eq, Ord, Read, Show)
_BooleanLiteral = Model.Name "hydra.ext.sql.syntax.BooleanLiteral"
_BooleanLiteral_TRUE = Model.Name "TRUE"
_BooleanLiteral_FALSE = Model.Name "FALSE"
_BooleanLiteral_UNKNOWN = Model.Name "UNKNOWN"
-- | An operand of a boolean predicate
newtype BooleanPredicand =
BooleanPredicand {
unBooleanPredicand :: ()}
deriving (Eq, Ord, Read, Show)
_BooleanPredicand = Model.Name "hydra.ext.sql.syntax.BooleanPredicand"
-- | A boolean primary expression: either a predicate or a boolean predicand
data BooleanPrimary =
BooleanPrimaryPredicate Predicate |
BooleanPrimaryPredicand BooleanPredicand
deriving (Eq, Ord, Read, Show)
_BooleanPrimary = Model.Name "hydra.ext.sql.syntax.BooleanPrimary"
_BooleanPrimary_predicate = Model.Name "predicate"
_BooleanPrimary_predicand = Model.Name "predicand"
-- | A boolean term: a factor, or a conjunction of terms with AND
data BooleanTerm =
BooleanTermFactor BooleanFactor |
BooleanTermConjunction BooleanTermAnd
deriving (Eq, Ord, Read, Show)
_BooleanTerm = Model.Name "hydra.ext.sql.syntax.BooleanTerm"
_BooleanTerm_factor = Model.Name "factor"
_BooleanTerm_conjunction = Model.Name "conjunction"
-- | A conjunction of two boolean terms joined by AND
data BooleanTermAnd =
BooleanTermAnd {
booleanTermAndLhs :: BooleanTerm,
booleanTermAndRhs :: BooleanFactor}
deriving (Eq, Ord, Read, Show)
_BooleanTermAnd = Model.Name "hydra.ext.sql.syntax.BooleanTermAnd"
_BooleanTermAnd_lhs = Model.Name "lhs"
_BooleanTermAnd_rhs = Model.Name "rhs"
-- | A boolean primary, optionally compared against a truth value with IS
data BooleanTest =
BooleanTest {
booleanTestBooleanPrimary :: BooleanPrimary,
booleanTestSequence :: (Maybe BooleanTestSequenceOption)}
deriving (Eq, Ord, Read, Show)
_BooleanTest = Model.Name "hydra.ext.sql.syntax.BooleanTest"
_BooleanTest_BooleanPrimary = Model.Name "BooleanPrimary"
_BooleanTest_Sequence = Model.Name "Sequence"
-- | The IS [NOT] truth-value suffix of a boolean test
data BooleanTestSequenceOption =
BooleanTestSequenceOption {
booleanTestSequenceOptionNOT :: (Maybe ()),
booleanTestSequenceOptionTruthValue :: TruthValue}
deriving (Eq, Ord, Read, Show)
_BooleanTestSequenceOption = Model.Name "hydra.ext.sql.syntax.BooleanTestSequenceOption"
_BooleanTestSequenceOption_NOT = Model.Name "NOT"
_BooleanTestSequenceOption_TruthValue = Model.Name "TruthValue"
-- | The BOOLEAN data type
newtype BooleanType =
BooleanType {
unBooleanType :: ()}
deriving (Eq, Ord, Read, Show)
_BooleanType = Model.Name "hydra.ext.sql.syntax.BooleanType"
-- | A boolean value expression: a term, or a disjunction of terms with OR
data BooleanValueExpression =
BooleanValueExpressionTerm BooleanTerm |
BooleanValueExpressionDisjunction BooleanValueExpressionOr
deriving (Eq, Ord, Read, Show)
_BooleanValueExpression = Model.Name "hydra.ext.sql.syntax.BooleanValueExpression"
_BooleanValueExpression_term = Model.Name "term"
_BooleanValueExpression_disjunction = Model.Name "disjunction"
-- | A disjunction of two boolean value expressions joined by OR
data BooleanValueExpressionOr =
BooleanValueExpressionOr {
booleanValueExpressionOrLhs :: BooleanValueExpression,
booleanValueExpressionOrRhs :: BooleanTerm}
deriving (Eq, Ord, Read, Show)
_BooleanValueExpressionOr = Model.Name "hydra.ext.sql.syntax.BooleanValueExpressionOr"
_BooleanValueExpressionOr_lhs = Model.Name "lhs"
_BooleanValueExpressionOr_rhs = Model.Name "rhs"
-- | A CASE expression, selecting a result from among several alternatives
newtype CaseExpression =
CaseExpression {
unCaseExpression :: ()}
deriving (Eq, Ord, Read, Show)
_CaseExpression = Model.Name "hydra.ext.sql.syntax.CaseExpression"
-- | A CAST expression, converting a value to a specified data type
newtype CastSpecification =
CastSpecification {
unCastSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_CastSpecification = Model.Name "hydra.ext.sql.syntax.CastSpecification"
-- | The name of a character set
newtype CharacterSetSpecification =
CharacterSetSpecification {
unCharacterSetSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_CharacterSetSpecification = Model.Name "hydra.ext.sql.syntax.CharacterSetSpecification"
-- | A character string literal, e.g. 'hello'
newtype CharacterStringLiteral =
CharacterStringLiteral {
unCharacterStringLiteral :: String}
deriving (Eq, Ord, Read, Show)
_CharacterStringLiteral = Model.Name "hydra.ext.sql.syntax.CharacterStringLiteral"
-- | A character string type: CHARACTER, VARCHAR, or CHARACTER LARGE OBJECT
data CharacterStringType =
CharacterStringTypeCharacter (Maybe Length) |
CharacterStringTypeChar (Maybe Length) |
CharacterStringTypeCharacterVarying Length |
CharacterStringTypeCharVarying Length |
CharacterStringTypeVarchar Length |
CharacterStringTypeCharacterLargeObject (Maybe LargeObjectLength) |
CharacterStringTypeCharLargeObject (Maybe LargeObjectLength) |
CharacterStringTypeClob (Maybe LargeObjectLength)
deriving (Eq, Ord, Read, Show)
_CharacterStringType = Model.Name "hydra.ext.sql.syntax.CharacterStringType"
_CharacterStringType_character = Model.Name "character"
_CharacterStringType_char = Model.Name "char"
_CharacterStringType_characterVarying = Model.Name "characterVarying"
_CharacterStringType_charVarying = Model.Name "charVarying"
_CharacterStringType_varchar = Model.Name "varchar"
_CharacterStringType_characterLargeObject = Model.Name "characterLargeObject"
_CharacterStringType_charLargeObject = Model.Name "charLargeObject"
_CharacterStringType_clob = Model.Name "clob"
-- | A COLLATE clause specifying the collation to apply to a character value
newtype CollateClause =
CollateClause {
unCollateClause :: ()}
deriving (Eq, Ord, Read, Show)
_CollateClause = Model.Name "hydra.ext.sql.syntax.CollateClause"
-- | A collection type: ARRAY or MULTISET
data CollectionType =
CollectionTypeArray ArrayType |
CollectionTypeMultiset MultisetType
deriving (Eq, Ord, Read, Show)
_CollectionType = Model.Name "hydra.ext.sql.syntax.CollectionType"
_CollectionType_array = Model.Name "array"
_CollectionType_multiset = Model.Name "multiset"
-- | A constructor for a collection value: an array or multiset constructor
data CollectionValueConstructor =
CollectionValueConstructorArray ArrayValueConstructor |
CollectionValueConstructorMultiset MultisetValueConstructor
deriving (Eq, Ord, Read, Show)
_CollectionValueConstructor = Model.Name "hydra.ext.sql.syntax.CollectionValueConstructor"
_CollectionValueConstructor_array = Model.Name "array"
_CollectionValueConstructor_multiset = Model.Name "multiset"
-- | An expression that evaluates to a collection value
data CollectionValueExpression =
CollectionValueExpressionArray ArrayValueExpression |
CollectionValueExpressionMultiset MultisetValueExpression
deriving (Eq, Ord, Read, Show)
_CollectionValueExpression = Model.Name "hydra.ext.sql.syntax.CollectionValueExpression"
_CollectionValueExpression_array = Model.Name "array"
_CollectionValueExpression_multiset = Model.Name "multiset"
-- | A constraint attached to a single column definition
newtype ColumnConstraintDefinition =
ColumnConstraintDefinition {
unColumnConstraintDefinition :: ()}
deriving (Eq, Ord, Read, Show)
_ColumnConstraintDefinition = Model.Name "hydra.ext.sql.syntax.ColumnConstraintDefinition"
-- | The definition of a single column within a table definition
data ColumnDefinition =
ColumnDefinition {
columnDefinitionName :: ColumnName,
columnDefinitionTypeOrDomain :: (Maybe ColumnDefinitionTypeOrDomainOption),
columnDefinitionRefScope :: (Maybe ReferenceScopeCheck),
columnDefinitionDefaultOrIdentityOrGeneration :: (Maybe ColumnDefinitionDefaultOrIdentityOrGenerationOption),
columnDefinitionConstraints :: [ColumnConstraintDefinition],
columnDefinitionCollate :: (Maybe CollateClause)}
deriving (Eq, Ord, Read, Show)
_ColumnDefinition = Model.Name "hydra.ext.sql.syntax.ColumnDefinition"
_ColumnDefinition_name = Model.Name "name"
_ColumnDefinition_typeOrDomain = Model.Name "typeOrDomain"
_ColumnDefinition_refScope = Model.Name "refScope"
_ColumnDefinition_defaultOrIdentityOrGeneration = Model.Name "defaultOrIdentityOrGeneration"
_ColumnDefinition_constraints = Model.Name "constraints"
_ColumnDefinition_collate = Model.Name "collate"
-- | A column's default value, identity, or generation specification
data ColumnDefinitionDefaultOrIdentityOrGenerationOption =
ColumnDefinitionDefaultOrIdentityOrGenerationOptionDefaultClause DefaultClause |
ColumnDefinitionDefaultOrIdentityOrGenerationOptionIdentityColumnSpecification IdentityColumnSpecification |
ColumnDefinitionDefaultOrIdentityOrGenerationOptionGenerationClause GenerationClause
deriving (Eq, Ord, Read, Show)
_ColumnDefinitionDefaultOrIdentityOrGenerationOption =
Model.Name "hydra.ext.sql.syntax.ColumnDefinitionDefaultOrIdentityOrGenerationOption"
_ColumnDefinitionDefaultOrIdentityOrGenerationOption_DefaultClause = Model.Name "DefaultClause"
_ColumnDefinitionDefaultOrIdentityOrGenerationOption_IdentityColumnSpecification =
Model.Name "IdentityColumnSpecification"
_ColumnDefinitionDefaultOrIdentityOrGenerationOption_GenerationClause = Model.Name "GenerationClause"
-- | A column's declared data type or domain
data ColumnDefinitionTypeOrDomainOption =
ColumnDefinitionTypeOrDomainOptionDataType DataType |
ColumnDefinitionTypeOrDomainOptionDomainName DomainName
deriving (Eq, Ord, Read, Show)
_ColumnDefinitionTypeOrDomainOption = Model.Name "hydra.ext.sql.syntax.ColumnDefinitionTypeOrDomainOption"
_ColumnDefinitionTypeOrDomainOption_DataType = Model.Name "DataType"
_ColumnDefinitionTypeOrDomainOption_DomainName = Model.Name "DomainName"
-- | The name of a table column
newtype ColumnName =
ColumnName {
unColumnName :: String}
deriving (Eq, Ord, Read, Show)
_ColumnName = Model.Name "hydra.ext.sql.syntax.ColumnName"
-- | A non-empty, comma-separated list of column names
data ColumnNameList =
ColumnNameList {
columnNameListFirst :: ColumnName,
columnNameListRest :: [ColumnName]}
deriving (Eq, Ord, Read, Show)
_ColumnNameList = Model.Name "hydra.ext.sql.syntax.ColumnNameList"
_ColumnNameList_first = Model.Name "first"
_ColumnNameList_rest = Model.Name "rest"
-- | The WITH OPTIONS clause of a column definition inherited via LIKE
newtype ColumnOptions =
ColumnOptions {
unColumnOptions :: ()}
deriving (Eq, Ord, Read, Show)
_ColumnOptions = Model.Name "hydra.ext.sql.syntax.ColumnOptions"
-- | A reference to a column, optionally qualified by a table or correlation name
newtype ColumnReference =
ColumnReference {
unColumnReference :: ()}
deriving (Eq, Ord, Read, Show)
_ColumnReference = Model.Name "hydra.ext.sql.syntax.ColumnReference"
-- | A value expression common to numeric, string, datetime, interval, user-defined, reference, and collection types
data CommonValueExpression =
CommonValueExpressionNumeric NumericValueExpression |
CommonValueExpressionString StringValueExpression |
CommonValueExpressionDatetime DatetimeValueExpression |
CommonValueExpressionInterval IntervalValueExpression |
CommonValueExpressionUserDefined UserDefinedTypeValueExpression |
CommonValueExpressionReference ReferenceValueExpression |
CommonValueExpressionCollection CollectionValueExpression
deriving (Eq, Ord, Read, Show)
_CommonValueExpression = Model.Name "hydra.ext.sql.syntax.CommonValueExpression"
_CommonValueExpression_numeric = Model.Name "numeric"
_CommonValueExpression_string = Model.Name "string"
_CommonValueExpression_datetime = Model.Name "datetime"
_CommonValueExpression_interval = Model.Name "interval"
_CommonValueExpression_userDefined = Model.Name "userDefined"
_CommonValueExpression_reference = Model.Name "reference"
_CommonValueExpression_collection = Model.Name "collection"
-- | A row value constructor whose element types are inferred from context
newtype ContextuallyTypedRowValueConstructor =
ContextuallyTypedRowValueConstructor {
unContextuallyTypedRowValueConstructor :: ()}
deriving (Eq, Ord, Read, Show)
_ContextuallyTypedRowValueConstructor = Model.Name "hydra.ext.sql.syntax.ContextuallyTypedRowValueConstructor"
-- | A contextually typed row value expression: a special case or a constructor
data ContextuallyTypedRowValueExpression =
ContextuallyTypedRowValueExpressionSpecialCase RowValueSpecialCase |
ContextuallyTypedRowValueExpressionConstructor ContextuallyTypedRowValueConstructor
deriving (Eq, Ord, Read, Show)
_ContextuallyTypedRowValueExpression = Model.Name "hydra.ext.sql.syntax.ContextuallyTypedRowValueExpression"
_ContextuallyTypedRowValueExpression_specialCase = Model.Name "specialCase"
_ContextuallyTypedRowValueExpression_constructor = Model.Name "constructor"
-- | A non-empty, comma-separated list of contextually typed row value expressions
data ContextuallyTypedRowValueExpressionList =
ContextuallyTypedRowValueExpressionList {
contextuallyTypedRowValueExpressionListFirst :: ContextuallyTypedRowValueExpression,
contextuallyTypedRowValueExpressionListRest :: [ContextuallyTypedRowValueExpression]}
deriving (Eq, Ord, Read, Show)
_ContextuallyTypedRowValueExpressionList = Model.Name "hydra.ext.sql.syntax.ContextuallyTypedRowValueExpressionList"
_ContextuallyTypedRowValueExpressionList_first = Model.Name "first"
_ContextuallyTypedRowValueExpressionList_rest = Model.Name "rest"
-- | A table value constructor built from a list of contextually typed row values
newtype ContextuallyTypedTableValueConstructor =
ContextuallyTypedTableValueConstructor {
unContextuallyTypedTableValueConstructor :: ContextuallyTypedRowValueExpressionList}
deriving (Eq, Ord, Read, Show)
_ContextuallyTypedTableValueConstructor = Model.Name "hydra.ext.sql.syntax.ContextuallyTypedTableValueConstructor"
-- | A data type: predefined, row, named, reference, or collection
data DataType =
DataTypePredefined PredefinedType |
DataTypeRow RowType |
DataTypeNamed PathResolvedUserDefinedTypeName |
DataTypeReference ReferenceType |
DataTypeCollection CollectionType
deriving (Eq, Ord, Read, Show)
_DataType = Model.Name "hydra.ext.sql.syntax.DataType"
_DataType_predefined = Model.Name "predefined"
_DataType_row = Model.Name "row"
_DataType_named = Model.Name "named"
_DataType_reference = Model.Name "reference"
_DataType_collection = Model.Name "collection"
-- | A DATE literal
newtype DateLiteral =
DateLiteral {
unDateLiteral :: DateString}
deriving (Eq, Ord, Read, Show)
_DateLiteral = Model.Name "hydra.ext.sql.syntax.DateLiteral"
-- | The string representation of a date literal, e.g. '2003-01-01'
newtype DateString =
DateString {
unDateString :: ()}
deriving (Eq, Ord, Read, Show)
_DateString = Model.Name "hydra.ext.sql.syntax.DateString"
-- | A datetime literal: a date, time, or timestamp literal
data DatetimeLiteral =
DatetimeLiteralDate DateLiteral |
DatetimeLiteralTime TimeLiteral |
DatetimeLiteralTimestamp TimestampLiteral
deriving (Eq, Ord, Read, Show)
_DatetimeLiteral = Model.Name "hydra.ext.sql.syntax.DatetimeLiteral"
_DatetimeLiteral_date = Model.Name "date"
_DatetimeLiteral_time = Model.Name "time"
_DatetimeLiteral_timestamp = Model.Name "timestamp"
-- | A datetime type: DATE, TIME, or TIMESTAMP
newtype DatetimeType =
DatetimeType {
unDatetimeType :: ()}
deriving (Eq, Ord, Read, Show)
_DatetimeType = Model.Name "hydra.ext.sql.syntax.DatetimeType"
-- | An expression that evaluates to a datetime value
newtype DatetimeValueExpression =
DatetimeValueExpression {
unDatetimeValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_DatetimeValueExpression = Model.Name "hydra.ext.sql.syntax.DatetimeValueExpression"
-- | A DEFAULT clause specifying a column's default value
newtype DefaultClause =
DefaultClause {
unDefaultClause :: ()}
deriving (Eq, Ord, Read, Show)
_DefaultClause = Model.Name "hydra.ext.sql.syntax.DefaultClause"
-- | The name of a user-defined domain
newtype DomainName =
DomainName {
unDomainName :: String}
deriving (Eq, Ord, Read, Show)
_DomainName = Model.Name "hydra.ext.sql.syntax.DomainName"
-- | An exact numeric literal, such as an integer or fixed-point decimal
newtype ExactNumericLiteral =
ExactNumericLiteral {
unExactNumericLiteral :: String}
deriving (Eq, Ord, Read, Show)
_ExactNumericLiteral = Model.Name "hydra.ext.sql.syntax.ExactNumericLiteral"
-- | An exact numeric type: NUMERIC, DECIMAL, DEC, SMALLINT, INTEGER, INT, or BIGINT
data ExactNumericType =
ExactNumericTypeNumeric (Maybe ExactNumericTypeNumericOption) |
ExactNumericTypeDecimal (Maybe ExactNumericTypeDecimalOption) |
ExactNumericTypeDec (Maybe ExactNumericTypeDecOption) |
ExactNumericTypeSmallint |
ExactNumericTypeInteger |
ExactNumericTypeInt |
ExactNumericTypeBigint
deriving (Eq, Ord, Read, Show)
_ExactNumericType = Model.Name "hydra.ext.sql.syntax.ExactNumericType"
_ExactNumericType_numeric = Model.Name "numeric"
_ExactNumericType_decimal = Model.Name "decimal"
_ExactNumericType_dec = Model.Name "dec"
_ExactNumericType_smallint = Model.Name "smallint"
_ExactNumericType_integer = Model.Name "integer"
_ExactNumericType_int = Model.Name "int"
_ExactNumericType_bigint = Model.Name "bigint"
-- | The precision and optional scale of a DEC type
data ExactNumericTypeDecOption =
ExactNumericTypeDecOption {
exactNumericTypeDecOptionPrecision :: Precision,
exactNumericTypeDecOptionSequence :: (Maybe Scale)}
deriving (Eq, Ord, Read, Show)
_ExactNumericTypeDecOption = Model.Name "hydra.ext.sql.syntax.ExactNumericTypeDecOption"
_ExactNumericTypeDecOption_Precision = Model.Name "Precision"
_ExactNumericTypeDecOption_Sequence = Model.Name "Sequence"
-- | The precision and optional scale of a DECIMAL type
data ExactNumericTypeDecimalOption =
ExactNumericTypeDecimalOption {
exactNumericTypeDecimalOptionPrecision :: Precision,
exactNumericTypeDecimalOptionSequence :: (Maybe Scale)}
deriving (Eq, Ord, Read, Show)
_ExactNumericTypeDecimalOption = Model.Name "hydra.ext.sql.syntax.ExactNumericTypeDecimalOption"
_ExactNumericTypeDecimalOption_Precision = Model.Name "Precision"
_ExactNumericTypeDecimalOption_Sequence = Model.Name "Sequence"
-- | The precision and optional scale of a NUMERIC type
data ExactNumericTypeNumericOption =
ExactNumericTypeNumericOption {
exactNumericTypeNumericOptionPrecision :: Precision,
exactNumericTypeNumericOptionSequence :: (Maybe Scale)}
deriving (Eq, Ord, Read, Show)
_ExactNumericTypeNumericOption = Model.Name "hydra.ext.sql.syntax.ExactNumericTypeNumericOption"
_ExactNumericTypeNumericOption_Precision = Model.Name "Precision"
_ExactNumericTypeNumericOption_Sequence = Model.Name "Sequence"
-- | A reference to a field of a row or structured value
newtype FieldReference =
FieldReference {
unFieldReference :: ()}
deriving (Eq, Ord, Read, Show)
_FieldReference = Model.Name "hydra.ext.sql.syntax.FieldReference"
-- | An INSERT source specified by an explicit value constructor, with optional column list and override clause
data FromConstructor =
FromConstructor {
fromConstructorColumns :: (Maybe InsertColumnList),
fromConstructorOverride :: (Maybe OverrideClause),
fromConstructorValues :: ContextuallyTypedTableValueConstructor}
deriving (Eq, Ord, Read, Show)
_FromConstructor = Model.Name "hydra.ext.sql.syntax.FromConstructor"
_FromConstructor_columns = Model.Name "columns"
_FromConstructor_override = Model.Name "override"
_FromConstructor_values = Model.Name "values"
-- | An INSERT source specified as DEFAULT VALUES
newtype FromDefault =
FromDefault {
unFromDefault :: ()}
deriving (Eq, Ord, Read, Show)
_FromDefault = Model.Name "hydra.ext.sql.syntax.FromDefault"
-- | An INSERT source specified as the result of a subquery
newtype FromSubquery =
FromSubquery {
unFromSubquery :: ()}
deriving (Eq, Ord, Read, Show)
_FromSubquery = Model.Name "hydra.ext.sql.syntax.FromSubquery"
-- | A general literal: a string, datetime, interval, or boolean literal
data GeneralLiteral =
GeneralLiteralString CharacterStringLiteral |
GeneralLiteralNationalString NationalCharacterStringLiteral |
GeneralLiteralUnicode UnicodeCharacterStringLiteral |
GeneralLiteralBinary BinaryStringLiteral |
GeneralLiteralDateTime DatetimeLiteral |
GeneralLiteralInterval IntervalLiteral |
GeneralLiteralBoolean BooleanLiteral
deriving (Eq, Ord, Read, Show)
_GeneralLiteral = Model.Name "hydra.ext.sql.syntax.GeneralLiteral"
_GeneralLiteral_string = Model.Name "string"
_GeneralLiteral_nationalString = Model.Name "nationalString"
_GeneralLiteral_unicode = Model.Name "unicode"
_GeneralLiteral_binary = Model.Name "binary"
_GeneralLiteral_dateTime = Model.Name "dateTime"
_GeneralLiteral_interval = Model.Name "interval"
_GeneralLiteral_boolean = Model.Name "boolean"
-- | A general value specification, such as a parameter or dynamic value
newtype GeneralValueSpecification =
GeneralValueSpecification {
unGeneralValueSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_GeneralValueSpecification = Model.Name "hydra.ext.sql.syntax.GeneralValueSpecification"
-- | A GENERATED ALWAYS AS clause for a computed column
newtype GenerationClause =
GenerationClause {
unGenerationClause :: ()}
deriving (Eq, Ord, Read, Show)
_GenerationClause = Model.Name "hydra.ext.sql.syntax.GenerationClause"
-- | The GLOBAL or LOCAL qualifier of a temporary table scope
data GlobalOrLocal =
GlobalOrLocalGlobal |
GlobalOrLocalLocal
deriving (Eq, Ord, Read, Show)
_GlobalOrLocal = Model.Name "hydra.ext.sql.syntax.GlobalOrLocal"
_GlobalOrLocal_global = Model.Name "global"
_GlobalOrLocal_local = Model.Name "local"
-- | A GENERATED ... AS IDENTITY column specification
newtype IdentityColumnSpecification =
IdentityColumnSpecification {
unIdentityColumnSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_IdentityColumnSpecification = Model.Name "hydra.ext.sql.syntax.IdentityColumnSpecification"
-- | The parenthesized list of target column names in an INSERT statement
newtype InsertColumnList =
InsertColumnList {
unInsertColumnList :: ColumnNameList}
deriving (Eq, Ord, Read, Show)
_InsertColumnList = Model.Name "hydra.ext.sql.syntax.InsertColumnList"
-- | The column list and value source of an INSERT statement: a subquery, constructor, or default
data InsertColumnsAndSource =
InsertColumnsAndSourceSubquery FromSubquery |
InsertColumnsAndSourceConstructor FromConstructor |
InsertColumnsAndSourceDefault FromDefault
deriving (Eq, Ord, Read, Show)
_InsertColumnsAndSource = Model.Name "hydra.ext.sql.syntax.InsertColumnsAndSource"
_InsertColumnsAndSource_subquery = Model.Name "subquery"
_InsertColumnsAndSource_constructor = Model.Name "constructor"
_InsertColumnsAndSource_default = Model.Name "default"
-- | An ANSI SQL INSERT statement
data InsertStatement =
InsertStatement {
insertStatementTarget :: InsertionTarget,
insertStatementColumnsAndSource :: InsertColumnsAndSource}
deriving (Eq, Ord, Read, Show)
_InsertStatement = Model.Name "hydra.ext.sql.syntax.InsertStatement"
_InsertStatement_target = Model.Name "target"
_InsertStatement_columnsAndSource = Model.Name "columnsAndSource"
-- | The table into which an INSERT statement inserts rows
newtype InsertionTarget =
InsertionTarget {
unInsertionTarget :: TableName}
deriving (Eq, Ord, Read, Show)
_InsertionTarget = Model.Name "hydra.ext.sql.syntax.InsertionTarget"
-- | An INTERVAL literal
newtype IntervalLiteral =
IntervalLiteral {
unIntervalLiteral :: ()}
deriving (Eq, Ord, Read, Show)
_IntervalLiteral = Model.Name "hydra.ext.sql.syntax.IntervalLiteral"
-- | The INTERVAL data type
newtype IntervalType =
IntervalType {
unIntervalType :: ()}
deriving (Eq, Ord, Read, Show)
_IntervalType = Model.Name "hydra.ext.sql.syntax.IntervalType"
-- | An expression that evaluates to an interval value
newtype IntervalValueExpression =
IntervalValueExpression {
unIntervalValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_IntervalValueExpression = Model.Name "hydra.ext.sql.syntax.IntervalValueExpression"
-- | The length specification of a large object type, e.g. 1K, 1M, or 1G
newtype LargeObjectLength =
LargeObjectLength {
unLargeObjectLength :: ()}
deriving (Eq, Ord, Read, Show)
_LargeObjectLength = Model.Name "hydra.ext.sql.syntax.LargeObjectLength"
-- | A left square bracket, or its trigraph equivalent ??(
newtype LeftBracketOrTrigraph =
LeftBracketOrTrigraph {
unLeftBracketOrTrigraph :: String}
deriving (Eq, Ord, Read, Show)
_LeftBracketOrTrigraph = Model.Name "hydra.ext.sql.syntax.LeftBracketOrTrigraph"
-- | The length specification of a character or binary string type
newtype Length =
Length {
unLength :: UnsignedInteger}
deriving (Eq, Ord, Read, Show)
_Length = Model.Name "hydra.ext.sql.syntax.Length"
-- | A LIKE clause, copying column definitions from another table
newtype LikeClause =
LikeClause {
unLikeClause :: ()}
deriving (Eq, Ord, Read, Show)
_LikeClause = Model.Name "hydra.ext.sql.syntax.LikeClause"
-- | An invocation of a method on a structured value
newtype MethodInvocation =
MethodInvocation {
unMethodInvocation :: ()}
deriving (Eq, Ord, Read, Show)
_MethodInvocation = Model.Name "hydra.ext.sql.syntax.MethodInvocation"
-- | A reference to an element of a multiset by way of the ELEMENT function
newtype MultisetElementReference =
MultisetElementReference {
unMultisetElementReference :: ()}
deriving (Eq, Ord, Read, Show)
_MultisetElementReference = Model.Name "hydra.ext.sql.syntax.MultisetElementReference"
-- | A MULTISET collection type over a given element data type
newtype MultisetType =
MultisetType {
unMultisetType :: DataType}
deriving (Eq, Ord, Read, Show)
_MultisetType = Model.Name "hydra.ext.sql.syntax.MultisetType"
-- | A constructor for a multiset value
newtype MultisetValueConstructor =
MultisetValueConstructor {
unMultisetValueConstructor :: ()}
deriving (Eq, Ord, Read, Show)
_MultisetValueConstructor = Model.Name "hydra.ext.sql.syntax.MultisetValueConstructor"
-- | An expression that evaluates to a multiset value
newtype MultisetValueExpression =
MultisetValueExpression {
unMultisetValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_MultisetValueExpression = Model.Name "hydra.ext.sql.syntax.MultisetValueExpression"
-- | A national character string literal, e.g. N'hello'
newtype NationalCharacterStringLiteral =
NationalCharacterStringLiteral {
unNationalCharacterStringLiteral :: ()}
deriving (Eq, Ord, Read, Show)
_NationalCharacterStringLiteral = Model.Name "hydra.ext.sql.syntax.NationalCharacterStringLiteral"
-- | A national character string type: NATIONAL CHARACTER or NATIONAL CHARACTER VARYING
newtype NationalCharacterStringType =
NationalCharacterStringType {
unNationalCharacterStringType :: ()}
deriving (Eq, Ord, Read, Show)
_NationalCharacterStringType = Model.Name "hydra.ext.sql.syntax.NationalCharacterStringType"
-- | A NEW invocation, constructing an instance of a structured type
newtype NewSpecification =
NewSpecification {
unNewSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_NewSpecification = Model.Name "hydra.ext.sql.syntax.NewSpecification"
-- | A NEXT VALUE FOR expression, retrieving the next value of a sequence generator
newtype NextValueExpression =
NextValueExpression {
unNextValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_NextValueExpression = Model.Name "hydra.ext.sql.syntax.NextValueExpression"
-- | A value expression primary that does not begin with a parenthesis
data NonparenthesizedValueExpressionPrimary =
NonparenthesizedValueExpressionPrimaryUnsigned UnsignedValueSpecification |
NonparenthesizedValueExpressionPrimaryColumn ColumnReference |
NonparenthesizedValueExpressionPrimarySetFunction SetFunctionSpecification |
NonparenthesizedValueExpressionPrimaryWindowFunction WindowFunction |
NonparenthesizedValueExpressionPrimaryScalarSubquery ScalarSubquery |
NonparenthesizedValueExpressionPrimaryCases CaseExpression |
NonparenthesizedValueExpressionPrimaryCast CastSpecification |
NonparenthesizedValueExpressionPrimaryField FieldReference |
NonparenthesizedValueExpressionPrimarySubtype SubtypeTreatment |
NonparenthesizedValueExpressionPrimaryMethod MethodInvocation |
NonparenthesizedValueExpressionPrimaryStaticMethod StaticMethodInvocation |
NonparenthesizedValueExpressionPrimaryNew NewSpecification |
NonparenthesizedValueExpressionPrimaryAttributeOrMethod AttributeOrMethodReference |
NonparenthesizedValueExpressionPrimaryReference ReferenceResolution |
NonparenthesizedValueExpressionPrimaryCollection CollectionValueConstructor |
NonparenthesizedValueExpressionPrimaryArrayElement ArrayElementReference |
NonparenthesizedValueExpressionPrimaryMultisetElement MultisetElementReference |
NonparenthesizedValueExpressionPrimaryRoutine RoutineInvocation |
NonparenthesizedValueExpressionPrimaryNext NextValueExpression
deriving (Eq, Ord, Read, Show)
_NonparenthesizedValueExpressionPrimary = Model.Name "hydra.ext.sql.syntax.NonparenthesizedValueExpressionPrimary"
_NonparenthesizedValueExpressionPrimary_unsigned = Model.Name "unsigned"
_NonparenthesizedValueExpressionPrimary_column = Model.Name "column"
_NonparenthesizedValueExpressionPrimary_setFunction = Model.Name "setFunction"
_NonparenthesizedValueExpressionPrimary_windowFunction = Model.Name "windowFunction"
_NonparenthesizedValueExpressionPrimary_scalarSubquery = Model.Name "scalarSubquery"
_NonparenthesizedValueExpressionPrimary_cases = Model.Name "cases"
_NonparenthesizedValueExpressionPrimary_cast = Model.Name "cast"
_NonparenthesizedValueExpressionPrimary_field = Model.Name "field"
_NonparenthesizedValueExpressionPrimary_subtype = Model.Name "subtype"
_NonparenthesizedValueExpressionPrimary_method = Model.Name "method"
_NonparenthesizedValueExpressionPrimary_staticMethod = Model.Name "staticMethod"
_NonparenthesizedValueExpressionPrimary_new = Model.Name "new"
_NonparenthesizedValueExpressionPrimary_attributeOrMethod = Model.Name "attributeOrMethod"
_NonparenthesizedValueExpressionPrimary_reference = Model.Name "reference"
_NonparenthesizedValueExpressionPrimary_collection = Model.Name "collection"
_NonparenthesizedValueExpressionPrimary_arrayElement = Model.Name "arrayElement"
_NonparenthesizedValueExpressionPrimary_multisetElement = Model.Name "multisetElement"
_NonparenthesizedValueExpressionPrimary_routine = Model.Name "routine"
_NonparenthesizedValueExpressionPrimary_next = Model.Name "next"
-- | A numeric type: exact or approximate
data NumericType =
NumericTypeExact ExactNumericType |
NumericTypeApproximate ApproximateNumericType
deriving (Eq, Ord, Read, Show)
_NumericType = Model.Name "hydra.ext.sql.syntax.NumericType"
_NumericType_exact = Model.Name "exact"
_NumericType_approximate = Model.Name "approximate"
-- | An expression that evaluates to a numeric value
newtype NumericValueExpression =
NumericValueExpression {
unNumericValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_NumericValueExpression = Model.Name "hydra.ext.sql.syntax.NumericValueExpression"
-- | An OVERRIDING USER VALUE or OVERRIDING SYSTEM VALUE clause of an INSERT statement
data OverrideClause =
OverrideClauseOVERRIDINGspUSERspVALUE |
OverrideClauseOVERRIDINGspSYSTEMspVALUE
deriving (Eq, Ord, Read, Show)
_OverrideClause = Model.Name "hydra.ext.sql.syntax.OverrideClause"
_OverrideClause_OVERRIDINGspUSERspVALUE = Model.Name "OVERRIDINGspUSERspVALUE"
_OverrideClause_OVERRIDINGspSYSTEMspVALUE = Model.Name "OVERRIDINGspSYSTEMspVALUE"
-- | A value expression enclosed in parentheses
newtype ParenthesizedValueExpression =
ParenthesizedValueExpression {
unParenthesizedValueExpression :: ValueExpression}
deriving (Eq, Ord, Read, Show)
_ParenthesizedValueExpression = Model.Name "hydra.ext.sql.syntax.ParenthesizedValueExpression"
-- | A user-defined type name, resolved against the current schema path
newtype PathResolvedUserDefinedTypeName =
PathResolvedUserDefinedTypeName {
unPathResolvedUserDefinedTypeName :: String}
deriving (Eq, Ord, Read, Show)
_PathResolvedUserDefinedTypeName = Model.Name "hydra.ext.sql.syntax.PathResolvedUserDefinedTypeName"
-- | The precision of a numeric type, as an unsigned integer
newtype Precision =
Precision {
unPrecision :: UnsignedInteger}
deriving (Eq, Ord, Read, Show)
_Precision = Model.Name "hydra.ext.sql.syntax.Precision"
-- | A predefined data type: string, numeric, boolean, datetime, or interval
data PredefinedType =
PredefinedTypeStringType PredefinedTypeString |
PredefinedTypeNationalStringType PredefinedTypeNationalString |
PredefinedTypeBlob BinaryLargeObjectStringType |
PredefinedTypeNumeric NumericType |
PredefinedTypeBoolean BooleanType |
PredefinedTypeDatetime DatetimeType |
PredefinedTypeInterval IntervalType
deriving (Eq, Ord, Read, Show)
_PredefinedType = Model.Name "hydra.ext.sql.syntax.PredefinedType"
_PredefinedType_stringType = Model.Name "stringType"
_PredefinedType_nationalStringType = Model.Name "nationalStringType"
_PredefinedType_blob = Model.Name "blob"
_PredefinedType_numeric = Model.Name "numeric"
_PredefinedType_boolean = Model.Name "boolean"
_PredefinedType_datetime = Model.Name "datetime"
_PredefinedType_interval = Model.Name "interval"
-- | A national character string type together with an optional COLLATE clause
data PredefinedTypeNationalString =
PredefinedTypeNationalString {
predefinedTypeNationalStringType :: NationalCharacterStringType,
predefinedTypeNationalStringCollate :: (Maybe CollateClause)}
deriving (Eq, Ord, Read, Show)
_PredefinedTypeNationalString = Model.Name "hydra.ext.sql.syntax.PredefinedTypeNationalString"
_PredefinedTypeNationalString_type = Model.Name "type"
_PredefinedTypeNationalString_collate = Model.Name "collate"
-- | A character string type together with an optional character set and COLLATE clause
data PredefinedTypeString =
PredefinedTypeString {
predefinedTypeStringType :: CharacterStringType,
predefinedTypeStringCharacters :: (Maybe CharacterSetSpecification),
predefinedTypeStringCollate :: (Maybe CollateClause)}
deriving (Eq, Ord, Read, Show)
_PredefinedTypeString = Model.Name "hydra.ext.sql.syntax.PredefinedTypeString"
_PredefinedTypeString_type = Model.Name "type"
_PredefinedTypeString_characters = Model.Name "characters"
_PredefinedTypeString_collate = Model.Name "collate"
-- | A predicate, evaluating to a boolean truth value
newtype Predicate =
Predicate {
unPredicate :: ()}
deriving (Eq, Ord, Read, Show)
_Predicate = Model.Name "hydra.ext.sql.syntax.Predicate"
-- | A query expression, such as a SELECT statement possibly combined with set operators
newtype QueryExpression =
QueryExpression {
unQueryExpression :: ()}
deriving (Eq, Ord, Read, Show)
_QueryExpression = Model.Name "hydra.ext.sql.syntax.QueryExpression"
-- | The DEREF operator, resolving a reference to the value it targets
newtype ReferenceResolution =
ReferenceResolution {
unReferenceResolution :: ()}
deriving (Eq, Ord, Read, Show)
_ReferenceResolution = Model.Name "hydra.ext.sql.syntax.ReferenceResolution"
-- | A REFERENCES ARE [NOT] CHECKED clause on a reference-typed column
newtype ReferenceScopeCheck =
ReferenceScopeCheck {
unReferenceScopeCheck :: ()}
deriving (Eq, Ord, Read, Show)
_ReferenceScopeCheck = Model.Name "hydra.ext.sql.syntax.ReferenceScopeCheck"
-- | A REF reference type over a given referenced type
newtype ReferenceType =
ReferenceType {
unReferenceType :: ()}
deriving (Eq, Ord, Read, Show)
_ReferenceType = Model.Name "hydra.ext.sql.syntax.ReferenceType"
-- | An expression that evaluates to a reference value
newtype ReferenceValueExpression =
ReferenceValueExpression {
unReferenceValueExpression :: ValueExpressionPrimary}
deriving (Eq, Ord, Read, Show)
_ReferenceValueExpression = Model.Name "hydra.ext.sql.syntax.ReferenceValueExpression"
-- | A right square bracket, or its trigraph equivalent ??)
newtype RightBracketOrTrigraph =
RightBracketOrTrigraph {
unRightBracketOrTrigraph :: String}
deriving (Eq, Ord, Read, Show)
_RightBracketOrTrigraph = Model.Name "hydra.ext.sql.syntax.RightBracketOrTrigraph"
-- | An invocation of a user-defined SQL routine
newtype RoutineInvocation =
RoutineInvocation {
unRoutineInvocation :: ()}
deriving (Eq, Ord, Read, Show)
_RoutineInvocation = Model.Name "hydra.ext.sql.syntax.RoutineInvocation"
-- | A ROW type, defined by a list of field name and data type pairs
newtype RowType =
RowType {
unRowType :: ()}
deriving (Eq, Ord, Read, Show)
_RowType = Model.Name "hydra.ext.sql.syntax.RowType"
-- | An expression that evaluates to a row value
newtype RowValueExpression =
RowValueExpression {
unRowValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_RowValueExpression = Model.Name "hydra.ext.sql.syntax.RowValueExpression"
-- | A row value expressed as a single nonparenthesized value expression
newtype RowValueSpecialCase =
RowValueSpecialCase {
unRowValueSpecialCase :: NonparenthesizedValueExpressionPrimary}
deriving (Eq, Ord, Read, Show)
_RowValueSpecialCase = Model.Name "hydra.ext.sql.syntax.RowValueSpecialCase"
-- | A subquery that returns exactly one row and one column
newtype ScalarSubquery =
ScalarSubquery {
unScalarSubquery :: Subquery}
deriving (Eq, Ord, Read, Show)
_ScalarSubquery = Model.Name "hydra.ext.sql.syntax.ScalarSubquery"
-- | The scale of a numeric type, as an unsigned integer
newtype Scale =
Scale {
unScale :: UnsignedInteger}
deriving (Eq, Ord, Read, Show)
_Scale = Model.Name "hydra.ext.sql.syntax.Scale"
-- | A REF IS clause identifying a table's self-referencing column
newtype SelfReferencingColumnSpecification =
SelfReferencingColumnSpecification {
unSelfReferencingColumnSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_SelfReferencingColumnSpecification = Model.Name "hydra.ext.sql.syntax.SelfReferencingColumnSpecification"
-- | A set (aggregate) function invocation, such as COUNT or SUM
newtype SetFunctionSpecification =
SetFunctionSpecification {
unSetFunctionSpecification :: ()}
deriving (Eq, Ord, Read, Show)
_SetFunctionSpecification = Model.Name "hydra.ext.sql.syntax.SetFunctionSpecification"
-- | An invocation of a static method on a user-defined type
newtype StaticMethodInvocation =
StaticMethodInvocation {
unStaticMethodInvocation :: ()}
deriving (Eq, Ord, Read, Show)
_StaticMethodInvocation = Model.Name "hydra.ext.sql.syntax.StaticMethodInvocation"
-- | An expression that evaluates to a character, binary, or Unicode string value
newtype StringValueExpression =
StringValueExpression {
unStringValueExpression :: ()}
deriving (Eq, Ord, Read, Show)
_StringValueExpression = Model.Name "hydra.ext.sql.syntax.StringValueExpression"
-- | A parenthesized query expression used as an operand
newtype Subquery =
Subquery {
unSubquery :: QueryExpression}
deriving (Eq, Ord, Read, Show)
_Subquery = Model.Name "hydra.ext.sql.syntax.Subquery"
-- | An UNDER clause declaring a table as a subtable of a supertable
newtype SubtableClause =
SubtableClause {
unSubtableClause :: ()}
deriving (Eq, Ord, Read, Show)
_SubtableClause = Model.Name "hydra.ext.sql.syntax.SubtableClause"
-- | A TREAT AS expression, treating a value as an instance of a subtype
newtype SubtypeTreatment =
SubtypeTreatment {
unSubtypeTreatment :: ()}
deriving (Eq, Ord, Read, Show)
_SubtypeTreatment = Model.Name "hydra.ext.sql.syntax.SubtypeTreatment"
-- | The ON COMMIT action of a temporary table: PRESERVE ROWS or DELETE ROWS
data TableCommitAction =
TableCommitActionPreserve |
TableCommitActionDelete
deriving (Eq, Ord, Read, Show)
_TableCommitAction = Model.Name "hydra.ext.sql.syntax.TableCommitAction"
_TableCommitAction_preserve = Model.Name "preserve"
_TableCommitAction_delete = Model.Name "delete"
-- | A table-level constraint definition
newtype TableConstraintDefinition =
TableConstraintDefinition {
unTableConstraintDefinition :: ()}
deriving (Eq, Ord, Read, Show)
_TableConstraintDefinition = Model.Name "hydra.ext.sql.syntax.TableConstraintDefinition"
-- | The source of a table's contents: an element list, a supertable, or a query
data TableContentsSource =
TableContentsSourceList TableElementList |
TableContentsSourceSubtableOf TableContentsSourceSubtable |
TableContentsSourceSubquery AsSubqueryClause
deriving (Eq, Ord, Read, Show)
_TableContentsSource = Model.Name "hydra.ext.sql.syntax.TableContentsSource"
_TableContentsSource_list = Model.Name "list"
_TableContentsSource_subtableOf = Model.Name "subtableOf"
_TableContentsSource_subquery = Model.Name "subquery"
-- | A table's contents defined as a subtable of a named user-defined type
data TableContentsSourceSubtable =
TableContentsSourceSubtable {
tableContentsSourceSubtableType :: PathResolvedUserDefinedTypeName,
tableContentsSourceSubtableSubtable :: (Maybe SubtableClause),
tableContentsSourceSubtableElements :: (Maybe TableElementList)}
deriving (Eq, Ord, Read, Show)
_TableContentsSourceSubtable = Model.Name "hydra.ext.sql.syntax.TableContentsSourceSubtable"
_TableContentsSourceSubtable_type = Model.Name "type"
_TableContentsSourceSubtable_subtable = Model.Name "subtable"
_TableContentsSourceSubtable_elements = Model.Name "elements"
-- | An ANSI SQL CREATE TABLE statement
data TableDefinition =
TableDefinition {
tableDefinitionScope :: (Maybe TableScope),
tableDefinitionName :: TableName,
tableDefinitionSource :: TableContentsSource,
tableDefinitionCommitActions :: (Maybe TableCommitAction)}
deriving (Eq, Ord, Read, Show)
_TableDefinition = Model.Name "hydra.ext.sql.syntax.TableDefinition"
_TableDefinition_scope = Model.Name "scope"
_TableDefinition_name = Model.Name "name"
_TableDefinition_source = Model.Name "source"
_TableDefinition_commitActions = Model.Name "commitActions"
-- | An element of a table definition: a column, constraint, LIKE clause, or related option
data TableElement =
TableElementColumn ColumnDefinition |
TableElementTableConstraint TableConstraintDefinition |
TableElementLike LikeClause |
TableElementSelfReferencingColumn SelfReferencingColumnSpecification |
TableElementColumOptions ColumnOptions
deriving (Eq, Ord, Read, Show)
_TableElement = Model.Name "hydra.ext.sql.syntax.TableElement"
_TableElement_column = Model.Name "column"
_TableElement_tableConstraint = Model.Name "tableConstraint"
_TableElement_like = Model.Name "like"
_TableElement_selfReferencingColumn = Model.Name "selfReferencingColumn"
_TableElement_columOptions = Model.Name "columOptions"
-- | A non-empty, comma-separated list of table elements
data TableElementList =
TableElementList {
tableElementListFirst :: TableElement,
tableElementListRest :: [TableElement]}
deriving (Eq, Ord, Read, Show)
_TableElementList = Model.Name "hydra.ext.sql.syntax.TableElementList"
_TableElementList_first = Model.Name "first"
_TableElementList_rest = Model.Name "rest"
-- | The name of a table
newtype TableName =
TableName {
unTableName :: String}
deriving (Eq, Ord, Read, Show)
_TableName = Model.Name "hydra.ext.sql.syntax.TableName"
-- | The GLOBAL or LOCAL TEMPORARY scope of a table definition
newtype TableScope =
TableScope {
unTableScope :: GlobalOrLocal}
deriving (Eq, Ord, Read, Show)
_TableScope = Model.Name "hydra.ext.sql.syntax.TableScope"
-- | A TIME literal
newtype TimeLiteral =
TimeLiteral {
unTimeLiteral :: TimeString}
deriving (Eq, Ord, Read, Show)
_TimeLiteral = Model.Name "hydra.ext.sql.syntax.TimeLiteral"
-- | The string representation of a time literal, e.g. '12:00:00'
newtype TimeString =
TimeString {
unTimeString :: ()}
deriving (Eq, Ord, Read, Show)
_TimeString = Model.Name "hydra.ext.sql.syntax.TimeString"
-- | A timestamp literal, combining a date and a time
newtype TimestampLiteral =
TimestampLiteral {
unTimestampLiteral :: ()}
deriving (Eq, Ord, Read, Show)
_TimestampLiteral = Model.Name "hydra.ext.sql.syntax.TimestampLiteral"
-- | A three-valued logic truth value: TRUE, FALSE, or UNKNOWN
data TruthValue =
TruthValueTRUE |
TruthValueFALSE |
TruthValueUNKNOWN
deriving (Eq, Ord, Read, Show)
_TruthValue = Model.Name "hydra.ext.sql.syntax.TruthValue"
_TruthValue_TRUE = Model.Name "TRUE"
_TruthValue_FALSE = Model.Name "FALSE"
_TruthValue_UNKNOWN = Model.Name "UNKNOWN"
-- | A Unicode character string literal, e.g. U&'hello'
newtype UnicodeCharacterStringLiteral =
UnicodeCharacterStringLiteral {
unUnicodeCharacterStringLiteral :: ()}
deriving (Eq, Ord, Read, Show)
_UnicodeCharacterStringLiteral = Model.Name "hydra.ext.sql.syntax.UnicodeCharacterStringLiteral"
-- | An unsigned integer literal
newtype UnsignedInteger =
UnsignedInteger {
unUnsignedInteger :: String}
deriving (Eq, Ord, Read, Show)
_UnsignedInteger = Model.Name "hydra.ext.sql.syntax.UnsignedInteger"
-- | An unsigned literal: a numeric or general literal
data UnsignedLiteral =
UnsignedLiteralNumeric UnsignedNumericLiteral |
UnsignedLiteralGeneral GeneralLiteral
deriving (Eq, Ord, Read, Show)
_UnsignedLiteral = Model.Name "hydra.ext.sql.syntax.UnsignedLiteral"
_UnsignedLiteral_numeric = Model.Name "numeric"
_UnsignedLiteral_general = Model.Name "general"
-- | An unsigned numeric literal: exact or approximate
data UnsignedNumericLiteral =
UnsignedNumericLiteralExact ExactNumericLiteral |
UnsignedNumericLiteralApproximate ApproximateNumericLiteral
deriving (Eq, Ord, Read, Show)
_UnsignedNumericLiteral = Model.Name "hydra.ext.sql.syntax.UnsignedNumericLiteral"
_UnsignedNumericLiteral_exact = Model.Name "exact"
_UnsignedNumericLiteral_approximate = Model.Name "approximate"
-- | An unsigned value specification: a literal or a general value specification
data UnsignedValueSpecification =
UnsignedValueSpecificationLiteral UnsignedLiteral |
UnsignedValueSpecificationGeneral GeneralValueSpecification
deriving (Eq, Ord, Read, Show)
_UnsignedValueSpecification = Model.Name "hydra.ext.sql.syntax.UnsignedValueSpecification"
_UnsignedValueSpecification_literal = Model.Name "literal"
_UnsignedValueSpecification_general = Model.Name "general"
-- | An expression that evaluates to a value of a user-defined type
newtype UserDefinedTypeValueExpression =
UserDefinedTypeValueExpression {
unUserDefinedTypeValueExpression :: ValueExpressionPrimary}
deriving (Eq, Ord, Read, Show)
_UserDefinedTypeValueExpression = Model.Name "hydra.ext.sql.syntax.UserDefinedTypeValueExpression"
-- | A value expression: common, boolean, or row-valued
data ValueExpression =
ValueExpressionCommon CommonValueExpression |
ValueExpressionBoolean BooleanValueExpression |
ValueExpressionRow RowValueExpression
deriving (Eq, Ord, Read, Show)
_ValueExpression = Model.Name "hydra.ext.sql.syntax.ValueExpression"
_ValueExpression_common = Model.Name "common"
_ValueExpression_boolean = Model.Name "boolean"
_ValueExpression_row = Model.Name "row"
-- | A value expression primary, optionally parenthesized
data ValueExpressionPrimary =
ValueExpressionPrimaryParens ParenthesizedValueExpression |
ValueExpressionPrimaryNoparens NonparenthesizedValueExpressionPrimary
deriving (Eq, Ord, Read, Show)
_ValueExpressionPrimary = Model.Name "hydra.ext.sql.syntax.ValueExpressionPrimary"
_ValueExpressionPrimary_parens = Model.Name "parens"
_ValueExpressionPrimary_noparens = Model.Name "noparens"
-- | A window function invocation, such as ROW_NUMBER() OVER (...)
newtype WindowFunction =
WindowFunction {
unWindowFunction :: ()}
deriving (Eq, Ord, Read, Show)
_WindowFunction = Model.Name "hydra.ext.sql.syntax.WindowFunction"