mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-29 02:14:57 +03:00
6611fbd625
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4314 GitOrigin-RevId: 852bc941782414c7d190c6195ff367493b927639
57 lines
1.4 KiB
Haskell
57 lines
1.4 KiB
Haskell
-- | This module provides constants that are either:
|
|
--
|
|
-- * Simply in common user
|
|
-- * Define names that that multiple pieces of code reference.
|
|
module Hasura.Backends.MSSQL.FromIr.Constants
|
|
( trueExpression,
|
|
nullExpression,
|
|
emptyArrayExpression,
|
|
jsonFieldName,
|
|
aggSubselectName,
|
|
existsFieldName,
|
|
aggFieldName,
|
|
tempTableNameInserted,
|
|
tempTableNameValues,
|
|
tempTableNameDeleted,
|
|
tempTableNameUpdated,
|
|
)
|
|
where
|
|
|
|
import Database.ODBC.SQLServer qualified as ODBC
|
|
import Hasura.Backends.MSSQL.Instances.Types ()
|
|
import Hasura.Backends.MSSQL.Types.Internal as TSQL
|
|
import Hasura.Prelude
|
|
|
|
trueExpression :: Expression
|
|
trueExpression = ValueExpression $ ODBC.BoolValue True
|
|
|
|
nullExpression :: Expression
|
|
nullExpression = ValueExpression $ ODBC.TextValue "null"
|
|
|
|
emptyArrayExpression :: Expression
|
|
emptyArrayExpression = ValueExpression $ ODBC.TextValue "[]"
|
|
|
|
jsonFieldName :: Text
|
|
jsonFieldName = "json"
|
|
|
|
aggSubselectName :: Text
|
|
aggSubselectName = "agg_sub"
|
|
|
|
existsFieldName :: Text
|
|
existsFieldName = "exists_placeholder"
|
|
|
|
aggFieldName :: Text
|
|
aggFieldName = "agg"
|
|
|
|
tempTableNameInserted :: TempTableName
|
|
tempTableNameInserted = TempTableName "inserted"
|
|
|
|
tempTableNameValues :: TempTableName
|
|
tempTableNameValues = TempTableName "values"
|
|
|
|
tempTableNameDeleted :: TempTableName
|
|
tempTableNameDeleted = TempTableName "deleted"
|
|
|
|
tempTableNameUpdated :: TempTableName
|
|
tempTableNameUpdated = TempTableName "updated"
|