Safe Haskell | None |
---|---|
Language | GHC2021 |
Napkin.Types.Core
Synopsis
- data Name
- textName :: Text -> Name
- nameString :: Name -> String
- nameText :: Name -> Text
- nameLitStr :: Name -> SrcLitStr
- nameStringQuoted :: Name -> Text
- _name :: Iso' String Name
- newtype Ref (a :: k) = Ref {}
- text2Ref :: forall {k} (a :: k). Text -> Ref a
- newtype NormalizedTable = Normalized {}
- data ListedTableKind
- data ListedTable = ListedTable {}
- newtype TemporaryTableName = TemporaryTableName (Ref Table)
- newtype SpecTableName = SpecTableName {}
- useSpecName :: SpecTableName -> Ref Table
- class IsRef a where
- refComponentCount :: forall {k} (a :: k). Ref a -> Int
- stringRefIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p (Ref a) (f (Ref a)) -> p String (f String)
- refStringIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p String (f String) -> p (Ref a) (f (Ref a))
- refNameIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p (Ref a) (f (Ref a)) -> p (NonEmpty Name) (f (NonEmpty Name))
- stringRef :: forall {k} (a :: k). String -> Ref a
- textRef :: forall {k} (a :: k). Text -> Ref a
- nameRef :: forall {k} (a :: k). Name -> Ref a
- namesRef :: forall {k} (a :: k). [Name] -> Ref a
- sNamesRef :: forall {k} (a :: k). NonEmpty Name -> Ref a
- sNameRef :: forall {k} (a :: k). Name -> Ref a
- refString :: forall {k} (t :: k). Ref t -> String
- specTableString :: SpecTableName -> String
- refText :: forall {k} (t :: k). Ref t -> Text
- specTableText :: SpecTableName -> Text
- retagRef :: forall {k1} {k2} (t :: k1) (a :: k2). Ref t -> Ref a
- appendRef :: forall {k} (a :: k). Ref a -> Name -> Ref a
- star :: SExp
- data Table
- data Function
- keywordRef :: String -> Ref Function
- data Selected a = Selected {
- _selectRef :: Ref a
- _selectItem :: a
- data Alias a = Alias {
- _aliasRef :: Maybe (Ref a)
- _aliasItem :: a
- nonAlias :: a -> Alias a
- class WithName (a :: Type -> Type) where
- sa :: WithName a => Ref b -> b -> a b
- selectToAlias :: Selected a -> Alias a
- data StructField
- data Value
- newtype Interval = Interval {
- _unInterval :: [(SExp, DatePart)]
- data IntInterval = IntInterval SExp DatePart
- data ArrayBase
- data Nullability
- data Field = Field Nullability Type
- data SExp
- = Lit Value
- | Var (Ref SExp)
- | ArraySelect Query
- | ArrayItem { }
- | Array { }
- | Struct { }
- | FieldAccess { }
- | Extern ExternFun
- | Case [(SExp, SExp)] SExp
- | ExceptColumns SExp [Ref SExp]
- | SubQuery Query
- | NativeExpr NativeExpr
- data NativeExpr
- var :: forall {k} (a :: k). Ref a -> SExp
- varString :: String -> SExp
- nil :: SExp
- data NullStrategy
- data Distinctness
- type Partition = [SExp]
- data WOver = WOver {}
- data WindowFrameUnit
- data WindowFun = SimpleWindow (Ref Function) [SExp] WOver (Maybe NullStrategy)
- data WindowFrame
- data FrameLength
- data FunModifier
- data ExternFun
- = SimpleExtern (Ref Function) [SExp]
- | ParensExtern [ParensOperator]
- | ModExtern (Ref Function) [SExp] [FunModifier]
- | Cast SExp Type
- | SafeCast SExp Type
- | ExternWindow WindowFun
- | ExternRaw String
- type OriginTypeName = Text
- data Type
- data DatePart
- type Order = [OrderPart]
- type GroupBy = [SExp]
- data OrderDir
- invertOrder :: OrderDir -> OrderDir
- data NullOrder
- data OrderPart = OrderPart {}
- order :: SExp -> OrderPart
- data Relation
- table :: forall {k} (a :: k). Ref a -> Relation
- data JoinType
- data From = From (Selected Relation) [(Selected Relation, JoinType, Either (Maybe SExp) [Ref SExp])]
- fromAliases :: From -> [Ref Relation]
- data UnionType
- data RawQuery = RawQuery {
- _rawQuery_deps :: [Ref Table]
- _rawQuery_raw :: String
- data CteBody
- = JustCteBody (Selected Query)
- | PositionalBoundsCteBody (NonEmpty (Ref SExp)) (Selected Query)
- data WithClauses = WithClauses {}
- orderWithInserted :: WithClauses -> [(Ref Query, CteBody)]
- cteRefs :: forall {k} (a :: k). WithClauses -> Set (Ref a)
- data AsStruct
- type Keyword = Ref Function
- data ParensOperatorArgument
- data ParensOperator
- mapSExpOfParensOperatorArg :: (SExp -> SExp) -> ParensOperatorArgument -> ParensOperatorArgument
- type ColumnComment = (Ref SExp, Text)
- data Query
- = Query {
- _queryWith :: WithClauses
- _querySelect :: [Alias SExp]
- _queryComments :: [ColumnComment]
- _queryFrom :: Maybe From
- _queryTableOperator :: Maybe ParensOperator
- _queryWhere :: Maybe SExp
- _queryHaving :: Maybe SExp
- _queryGroup :: GroupBy
- _queryOrder :: Order
- _queryLimit :: Maybe Int
- _queryOffset :: Maybe Int
- _queryDistinct :: Distinctness
- _queryAs :: AsStruct
- | Union { }
- | QueryRaw RawQuery
- | NativeQuery NativeQuery
- = Query {
- data NativeQuery
- emptyQuery :: Query
- mkUnion :: UnionType -> [Query] -> Query
- collectUnionQueries :: Query -> NonEmpty Query
- data DefinedRelation = (AsRelation s, HasDefinition s, MaybeQuery s) => DefinedRelation s
- data DefinedQuery = HasDefinition s => DefinedQuery s
- class AsRelation s where
- asRelation :: s -> Relation
- class HasDefinition s where
- class MaybeQuery s where
- queryFullySpecified :: Data a => a -> Bool
- opExp :: Lens' OrderPart SExp
- opNulls :: Lens' OrderPart (Maybe NullOrder)
- opOrder :: Lens' OrderPart OrderDir
- rawQuery_deps :: Lens' RawQuery [Ref Table]
- rawQuery_raw :: Lens' RawQuery String
- queryAs :: Traversal' Query AsStruct
- queryComments :: Traversal' Query [ColumnComment]
- queryDistinct :: Traversal' Query Distinctness
- queryFrom :: Traversal' Query (Maybe From)
- queryGroup :: Traversal' Query GroupBy
- queryHaving :: Traversal' Query (Maybe SExp)
- queryLimit :: Traversal' Query (Maybe Int)
- queryOffset :: Traversal' Query (Maybe Int)
- queryOrder :: Traversal' Query Order
- querySelect :: Traversal' Query [Alias SExp]
- queryTableOperator :: Traversal' Query (Maybe ParensOperator)
- queryWhere :: Traversal' Query (Maybe SExp)
- queryWith :: Traversal' Query WithClauses
- unionQuery1 :: Traversal' Query Query
- unionQuery2 :: Traversal' Query Query
- unionType :: Traversal' Query UnionType
- unionWiths :: Traversal' Query WithClauses
- _Query :: Prism' Query (WithClauses, [Alias SExp], [ColumnComment], Maybe From, Maybe ParensOperator, Maybe SExp, Maybe SExp, GroupBy, Order, Maybe Int, Maybe Int, Distinctness, AsStruct)
- _Union :: Prism' Query (UnionType, Query, Query, WithClauses)
- _QueryRaw :: Prism' Query RawQuery
- _NativeQuery :: Prism' Query NativeQuery
- _From :: Iso' From (Selected Relation, [(Selected Relation, JoinType, Either (Maybe SExp) [Ref SExp])])
- _Specific :: Prism' Name SrcLitStr
- _Star :: Prism' Name ()
- _JoinLeft :: Prism' JoinType ()
- _JoinRight :: Prism' JoinType ()
- _JoinInner :: Prism' JoinType ()
- _JoinCross :: Prism' JoinType ()
- _JoinOuter :: Prism' JoinType ()
- _TableRelation :: Prism' Relation (Ref Table)
- _QueryRelation :: Prism' Relation Query
- _ArrayRelation :: Prism' Relation SExp
- _RawRelation :: Prism' Relation ([Ref Table], String)
- unRef :: forall k1 (a1 :: k1) k2 (a2 :: k2) p f. (Profunctor p, Functor f) => p (NonEmpty Name) (f (NonEmpty Name)) -> p (Ref a1) (f (Ref a2))
- _VDouble :: Prism' Value Double
- _VInt :: Prism' Value Int64
- _VBool :: Prism' Value Bool
- _VDate :: Prism' Value Day
- _VDateTime :: Prism' Value UTCTime
- _VText :: Prism' Value SrcLitStr
- _VBinary :: Prism' Value ByteString
- _VInterval :: Prism' Value Interval
- _VNull :: Prism' Value ()
- _VDatePart :: Prism' Value DatePart
- _Millennium :: Prism' DatePart ()
- _Century :: Prism' DatePart ()
- _Decade :: Prism' DatePart ()
- _Epoch :: Prism' DatePart ()
- _Year :: Prism' DatePart ()
- _Quarter :: Prism' DatePart ()
- _Month :: Prism' DatePart ()
- _Week :: Prism' DatePart ()
- _DayOfWeek :: Prism' DatePart ()
- _DayOfYear :: Prism' DatePart ()
- _Day :: Prism' DatePart ()
- _Hour :: Prism' DatePart ()
- _Minute :: Prism' DatePart ()
- _Second :: Prism' DatePart ()
- _Millisecond :: Prism' DatePart ()
- _Microsecond :: Prism' DatePart ()
- _Lit :: Prism' SExp Value
- _Var :: Prism' SExp (Ref SExp)
- _ArraySelect :: Prism' SExp Query
- _ArrayItem :: Prism' SExp (ArrayBase, Nullability, SExp, SExp)
- _Array :: Prism' SExp (Maybe Type, [SExp])
- _Struct :: Prism' SExp (Maybe (OMap StructField Type), OMap StructField SExp)
- _FieldAccess :: Prism' SExp (SExp, StructField)
- _Extern :: Prism' SExp ExternFun
- _Case :: Prism' SExp ([(SExp, SExp)], SExp)
- _ExceptColumns :: Prism' SExp (SExp, [Ref SExp])
- _SubQuery :: Prism' SExp Query
- _NativeExpr :: Prism' SExp NativeExpr
- selectItem :: forall a f. Functor f => (a -> f a) -> Selected a -> f (Selected a)
- selectRef :: forall a f. Functor f => (Ref a -> f (Ref a)) -> Selected a -> f (Selected a)
- aliasItem :: forall a f. Functor f => (a -> f a) -> Alias a -> f (Alias a)
- aliasRef :: forall a f. Functor f => (Maybe (Ref a) -> f (Maybe (Ref a))) -> Alias a -> f (Alias a)
- overFrame :: Lens' WOver (Maybe WindowFrame)
- overOrder :: Lens' WOver Order
- overPartition :: Lens' WOver Partition
- normalizedRef :: Iso' NormalizedTable (Ref Table)
- normalized :: Lens' ListedTable NormalizedTable
- tableKind :: Lens' ListedTable ListedTableKind
- unName :: Traversal' Name SrcLitStr
- withClauses_cteBodies :: Lens' WithClauses (OMap (Ref Query) CteBody)
- withClauses_recursive :: Lens' WithClauses Bool
- _WithClauses :: Iso' WithClauses (Bool, OMap (Ref Query) CteBody)
- allQueryComments :: Lens' Query [ColumnComment]
- refNamespace :: forall {k} (a :: k) f. Functor f => (Maybe Name -> f (Maybe Name)) -> Ref a -> f (Ref a)
- class Val a where
- convS :: Lens' Text String
- integral :: (Integral a, Integral b) => Iso' a b
- _lit :: Val a => Prism' SExp a
- lit :: Val a => a -> SExp
- interval :: [(Double, DatePart)] -> SExp
- txt :: String -> SExp
- fullWindow :: WOver
- class TableRef a where
- relationRef :: TableRef a => Getter a Relation
- varAs :: forall {k} (a :: k). Ref a -> Selected SExp
- asSelf :: SExp -> Selected SExp
- funAs :: (SExp -> b) -> Ref b -> Selected b
- selectToRef :: Selected SExp -> SExp
- selectedExps :: forall a f. Applicative f => (a -> f a) -> [Selected a] -> f [Selected a]
- selectedNames :: forall a0 f. Applicative f => (String -> f String) -> [Selected a0] -> f [Selected a0]
- refName :: forall {k1} {k2} (a :: k1) (a1 :: k2) f. Applicative f => (String -> f String) -> Ref a -> f (Ref a1)
- refLitName :: forall {k1} {k2} (a :: k1) (a1 :: k2) f. Applicative f => (SrcLitStr -> f SrcLitStr) -> Ref a -> f (Ref a1)
- refRoot :: forall {k} (a :: k) f. Functor f => (Name -> f Name) -> Ref a -> f (Ref a)
- refJustRoot :: forall {k} (a :: k). Ref a -> Ref a
- refParentRoot :: forall {k} (a :: k). Ref a -> ([String], Maybe String)
- ne :: forall a p f. (Profunctor p, Functor f) => p (NonEmpty a) (f (NonEmpty a)) -> p [a] (f [a])
- selectedName :: forall a f. Applicative f => (Name -> f Name) -> Selected a -> f (Selected a)
- atAlias :: (Applicative f, Choice p) => Ref t -> Optic' p f (Alias t) (Alias t)
- aliasedNames :: HasDefinition s => Traversal' s (Ref SExp)
- viewAliasedNames :: (MaybeQuery s, Applicative f, Contravariant f) => (Ref SExp -> f (Ref SExp)) -> s -> f s
- scopeRefs :: forall {k} b (t :: k). Data b => Ref t -> b -> b
- scopeExps :: forall {k} b (t :: k). Data b => Ref t -> b -> b
- modifyExterns :: Data b => (ExternFun -> SExp) -> b -> b
- (^^.) :: Ref Relation -> Name -> SExp
- data AggLevel
- data UpdateQuery = UpdateQuery {}
- updateQueryFrom :: Lens' UpdateQuery (Maybe From)
- updateQuerySet :: Lens' UpdateQuery (OMap Name SExp)
- updateQueryTarget :: Lens' UpdateQuery (Alias (Ref Table))
- updateQueryWhere :: Lens' UpdateQuery (Maybe SExp)
- pattern NapkinTablePrefix :: (Eq a, IsString a) => a
- pattern NapkinTableSeparator :: (Eq a, IsString a) => a
- isTemporaryTable :: Ref Table -> Bool
- tmpTableNameFormat :: UTCTime -> Text -> Text
- getUTCTimeTemporaryTable :: Ref Table -> Maybe UTCTime
- getTemporaryTableName :: forall {k} m (b :: k). MonadIO m => m (Ref b)
Documentation
Instances
FromJSON Name # | |||||
Defined in Napkin.Types.Core | |||||
ToJSON Name # | |||||
Data Name # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name # dataTypeOf :: Name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) # gmapT :: (forall b. Data b => b -> b) -> Name -> Name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # | |||||
IsString Name # | |||||
Defined in Napkin.Types.Core Methods fromString :: String -> Name # | |||||
Monoid Name # | |||||
Semigroup Name # | |||||
Generic Name # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Name # | |||||
FromField Name # | |||||
Defined in Napkin.Parse.AEDA.CSVParser Methods parseField :: Field -> Parser Name # | |||||
ToField Name # | |||||
Defined in Napkin.Parse.AEDA.CSVParser | |||||
NFData Name # | |||||
Defined in Napkin.Types.Core | |||||
Eq Name # | |||||
Ord Name # | |||||
Hashable Name # | |||||
Defined in Napkin.Types.Core | |||||
IsRef Name # | |||||
Defined in Napkin.Types.Core | |||||
FromField Name # | |||||
Defined in Napkin.Run.PGCommon Methods | |||||
FromRow Name # | |||||
Defined in Napkin.Run.PGCommon | |||||
RenderSql Name BigQuery # | |||||
RenderSql Name MsSql # | |||||
RenderSql Name Postgres # | |||||
RenderSql Name Redshift # | |||||
RenderSql Name Sqlite # | |||||
Lift Name # | |||||
Lift (NonEmpty Name) # | |||||
Buildable [Name] # | |||||
Defined in Napkin.Types.Core | |||||
IsRef (NonEmpty Name) # | |||||
IsRef [Name] # | |||||
Defined in Napkin.Types.Core | |||||
HasDeps (OMap Name SExp) # | |||||
Cons (Ref a) (Ref a) Name Name # | |||||
Snoc (Ref a) (Ref a) Name Name # | |||||
type Rep Name # | |||||
Defined in Napkin.Types.Core type Rep Name = D1 ('MetaData "Name" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "Specific" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcLitStr)) :+: C1 ('MetaCons "Star" 'PrefixI 'False) (U1 :: Type -> Type)) |
nameString :: Name -> String #
nameLitStr :: Name -> SrcLitStr #
nameStringQuoted :: Name -> Text #
A way to refer to entities like fields, tables, schemas, etc. Namespacing is common so we keep a list here.
Instances
newtype NormalizedTable #
Constructors
Normalized | |
Fields |
Instances
Generic NormalizedTable # | |||||
Defined in Napkin.Types.Core Associated Types
Methods from :: NormalizedTable -> Rep NormalizedTable x # to :: Rep NormalizedTable x -> NormalizedTable # | |||||
Show NormalizedTable # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> NormalizedTable -> ShowS # show :: NormalizedTable -> String # showList :: [NormalizedTable] -> ShowS # | |||||
Buildable NormalizedTable # | |||||
Defined in Napkin.Types.Core Methods build :: NormalizedTable -> Builder # | |||||
Eq NormalizedTable # | |||||
Defined in Napkin.Types.Core Methods (==) :: NormalizedTable -> NormalizedTable -> Bool # (/=) :: NormalizedTable -> NormalizedTable -> Bool # | |||||
Ord NormalizedTable # | |||||
Defined in Napkin.Types.Core Methods compare :: NormalizedTable -> NormalizedTable -> Ordering # (<) :: NormalizedTable -> NormalizedTable -> Bool # (<=) :: NormalizedTable -> NormalizedTable -> Bool # (>) :: NormalizedTable -> NormalizedTable -> Bool # (>=) :: NormalizedTable -> NormalizedTable -> Bool # max :: NormalizedTable -> NormalizedTable -> NormalizedTable # min :: NormalizedTable -> NormalizedTable -> NormalizedTable # | |||||
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) BigQuery # | |||||
Defined in Napkin.Run.BigQuery Methods execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |||||
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) MsSql # | |||||
Defined in Napkin.Run.MsSql Methods execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |||||
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Postgres # | |||||
Defined in Napkin.Run.Postgres Methods execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |||||
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Redshift # | |||||
Defined in Napkin.Run.Redshift Methods execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |||||
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Sqlite # | |||||
Defined in Napkin.Run.Sqlite Methods execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |||||
type Rep NormalizedTable # | |||||
Defined in Napkin.Types.Core type Rep NormalizedTable = D1 ('MetaData "NormalizedTable" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "Normalized" 'PrefixI 'True) (S1 ('MetaSel ('Just "_normalizedRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Table)))) |
data ListedTableKind #
Constructors
Table | |
View | |
MaterializedView | |
External |
Instances
Data ListedTableKind # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListedTableKind -> c ListedTableKind # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListedTableKind # toConstr :: ListedTableKind -> Constr # dataTypeOf :: ListedTableKind -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListedTableKind) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListedTableKind) # gmapT :: (forall b. Data b => b -> b) -> ListedTableKind -> ListedTableKind # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListedTableKind -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListedTableKind -> r # gmapQ :: (forall d. Data d => d -> u) -> ListedTableKind -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ListedTableKind -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListedTableKind -> m ListedTableKind # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListedTableKind -> m ListedTableKind # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListedTableKind -> m ListedTableKind # | |
Read ListedTableKind # | |
Defined in Napkin.Types.Core Methods readsPrec :: Int -> ReadS ListedTableKind # readList :: ReadS [ListedTableKind] # | |
Show ListedTableKind # | |
Defined in Napkin.Types.Core Methods showsPrec :: Int -> ListedTableKind -> ShowS # show :: ListedTableKind -> String # showList :: [ListedTableKind] -> ShowS # | |
Buildable ListedTableKind # | |
Defined in Napkin.Types.Core Methods build :: ListedTableKind -> Builder # | |
Eq ListedTableKind # | |
Defined in Napkin.Types.Core Methods (==) :: ListedTableKind -> ListedTableKind -> Bool # (/=) :: ListedTableKind -> ListedTableKind -> Bool # | |
Ord ListedTableKind # | |
Defined in Napkin.Types.Core Methods compare :: ListedTableKind -> ListedTableKind -> Ordering # (<) :: ListedTableKind -> ListedTableKind -> Bool # (<=) :: ListedTableKind -> ListedTableKind -> Bool # (>) :: ListedTableKind -> ListedTableKind -> Bool # (>=) :: ListedTableKind -> ListedTableKind -> Bool # max :: ListedTableKind -> ListedTableKind -> ListedTableKind # min :: ListedTableKind -> ListedTableKind -> ListedTableKind # |
data ListedTable #
Constructors
ListedTable | |
Fields |
Instances
Buildable ListedTable # | |
Defined in Napkin.Types.Core Methods build :: ListedTable -> Builder # | |
Eq ListedTable # | |
Defined in Napkin.Types.Core | |
Ord ListedTable # | |
Defined in Napkin.Types.Core Methods compare :: ListedTable -> ListedTable -> Ordering # (<) :: ListedTable -> ListedTable -> Bool # (<=) :: ListedTable -> ListedTable -> Bool # (>) :: ListedTable -> ListedTable -> Bool # (>=) :: ListedTable -> ListedTable -> Bool # max :: ListedTable -> ListedTable -> ListedTable # min :: ListedTable -> ListedTable -> ListedTable # | |
Command ListTables (Set ListedTable) BigQuery # | |
Defined in Napkin.Run.BigQuery Methods execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> ListTables -> m (Set ListedTable) # | |
Command ListTables (Set ListedTable) MsSql # | |
Defined in Napkin.Run.MsSql Methods execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> ListTables -> m (Set ListedTable) # | |
Command ListTables (Set ListedTable) Postgres # | |
Defined in Napkin.Run.Postgres Methods execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> ListTables -> m (Set ListedTable) # | |
Command ListTables (Set ListedTable) Redshift # | |
Defined in Napkin.Run.Redshift Methods execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> ListTables -> m (Set ListedTable) # | |
Command ListTables (Set ListedTable) Sqlite # | |
Defined in Napkin.Run.Sqlite Methods execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> ListTables -> m (Set ListedTable) # |
newtype TemporaryTableName #
Constructors
TemporaryTableName (Ref Table) |
newtype SpecTableName #
The way to refer to tasks in the spec. With renaming these can then refer to tables in a database. Once renamed, they should never be repacked into newtype. Be careful to avoid use of Constructor SpecTableName internally in Napkin. Ideally, baseTableName will only be used when renaming, but this is less of a concern.
Constructors
SpecTableName | |
Fields |
Instances
FromJSON SpecTableName # | |||||
Defined in Napkin.Types.Core Methods parseJSON :: Value -> Parser SpecTableName # parseJSONList :: Value -> Parser [SpecTableName] # | |||||
FromJSONKey SpecTableName # | |||||
Defined in Napkin.Types.Core | |||||
ToJSON SpecTableName # | |||||
Defined in Napkin.Types.Core Methods toJSON :: SpecTableName -> Value # toEncoding :: SpecTableName -> Encoding # toJSONList :: [SpecTableName] -> Value # toEncodingList :: [SpecTableName] -> Encoding # omitField :: SpecTableName -> Bool # | |||||
ToJSONKey SpecTableName # | |||||
Defined in Napkin.Types.Core Methods | |||||
Data SpecTableName # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpecTableName -> c SpecTableName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpecTableName # toConstr :: SpecTableName -> Constr # dataTypeOf :: SpecTableName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpecTableName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpecTableName) # gmapT :: (forall b. Data b => b -> b) -> SpecTableName -> SpecTableName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpecTableName -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpecTableName -> r # gmapQ :: (forall d. Data d => d -> u) -> SpecTableName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpecTableName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpecTableName -> m SpecTableName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecTableName -> m SpecTableName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecTableName -> m SpecTableName # | |||||
IsString SpecTableName # | |||||
Defined in Napkin.Types.Core Methods fromString :: String -> SpecTableName # | |||||
Semigroup SpecTableName # | |||||
Defined in Napkin.Types.Core Methods (<>) :: SpecTableName -> SpecTableName -> SpecTableName # sconcat :: NonEmpty SpecTableName -> SpecTableName # stimes :: Integral b => b -> SpecTableName -> SpecTableName # | |||||
Generic SpecTableName # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show SpecTableName # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> SpecTableName -> ShowS # show :: SpecTableName -> String # showList :: [SpecTableName] -> ShowS # | |||||
Buildable SpecTableName # | |||||
Defined in Napkin.Types.Core Methods build :: SpecTableName -> Builder # | |||||
Eq SpecTableName # | |||||
Defined in Napkin.Types.Core Methods (==) :: SpecTableName -> SpecTableName -> Bool # (/=) :: SpecTableName -> SpecTableName -> Bool # | |||||
Ord SpecTableName # | |||||
Defined in Napkin.Types.Core Methods compare :: SpecTableName -> SpecTableName -> Ordering # (<) :: SpecTableName -> SpecTableName -> Bool # (<=) :: SpecTableName -> SpecTableName -> Bool # (>) :: SpecTableName -> SpecTableName -> Bool # (>=) :: SpecTableName -> SpecTableName -> Bool # max :: SpecTableName -> SpecTableName -> SpecTableName # min :: SpecTableName -> SpecTableName -> SpecTableName # | |||||
AsRelation SpecTableName # | |||||
Defined in Napkin.Types.Core Methods asRelation :: SpecTableName -> Relation # | |||||
TableRef SpecTableName # | |||||
Defined in Napkin.Types.Core | |||||
(BeamMigrateSqlBackend bk, FromBackendRow bk Text) => FromBackendRow bk SpecTableName # | |||||
Defined in Napkin.Metadata.Instances Methods fromBackendRow :: FromBackendRowM bk SpecTableName # valuesNeeded :: Proxy bk -> Proxy SpecTableName -> Int # | |||||
HasSqlValueSyntax bk Text => HasSqlValueSyntax bk SpecTableName # | |||||
Defined in Napkin.Metadata.Instances Methods sqlValueSyntax :: SpecTableName -> bk # | |||||
BeamSqlBackend bk => HasSqlEqualityCheck bk SpecTableName # | |||||
Defined in Napkin.Metadata.Instances Methods sqlEqE :: Proxy SpecTableName -> Proxy bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk # sqlNeqE :: Proxy SpecTableName -> Proxy bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk # sqlEqTriE :: Proxy SpecTableName -> Proxy bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk # sqlNeqTriE :: Proxy SpecTableName -> Proxy bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk -> BeamSqlBackendExpressionSyntax bk # | |||||
BeamMigrateSqlBackend bk => HasDefaultSqlDataType bk SpecTableName # | |||||
Defined in Napkin.Metadata.Instances Methods defaultSqlDataType :: Proxy SpecTableName -> Proxy bk -> Bool -> BeamSqlBackendDataTypeSyntax bk # defaultSqlDataTypeConstraints :: Proxy SpecTableName -> Proxy bk -> Bool -> [FieldCheck] # | |||||
BeamSqlBackend bk => DataTypeForBackend bk SpecTableName # | |||||
Defined in Napkin.Metadata.Migrations Methods dbType :: DataType bk SpecTableName # | |||||
type Rep SpecTableName # | |||||
Defined in Napkin.Types.Core type Rep SpecTableName = D1 ('MetaData "SpecTableName" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'True) (C1 ('MetaCons "SpecTableName" 'PrefixI 'True) (S1 ('MetaSel ('Just "baseTableName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Table)))) |
useSpecName :: SpecTableName -> Ref Table #
An alias for baseTableName to use when renaming. As renaming is the proper way to unpack a SpecTableName, use this when unpacking a SpecTableName for renaming (or potential renaming). A little semantic flag to demarcate proper usages.
Class of string-like types that can be interpreted as Ref
s
Instances
IsRef Name # | |
Defined in Napkin.Types.Core | |
IsRef Text # | |
Defined in Napkin.Types.Core | |
IsRef String # | |
Defined in Napkin.Types.Core | |
IsRef (NonEmpty Name) # | |
IsRef [Name] # | |
Defined in Napkin.Types.Core | |
IsRef (Ref a) # | |
Defined in Napkin.Types.Core |
stringRefIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p (Ref a) (f (Ref a)) -> p String (f String) #
refStringIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p String (f String) -> p (Ref a) (f (Ref a)) #
refNameIso :: forall {k} (a :: k) p f. (Profunctor p, Functor f) => p (Ref a) (f (Ref a)) -> p (NonEmpty Name) (f (NonEmpty Name)) #
specTableString :: SpecTableName -> String #
specTableText :: SpecTableName -> Text #
Instances
Data Table # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Table -> c Table # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Table # dataTypeOf :: Table -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Table) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Table) # gmapT :: (forall b. Data b => b -> b) -> Table -> Table # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Table -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Table -> r # gmapQ :: (forall d. Data d => d -> u) -> Table -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Table -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Table -> m Table # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Table -> m Table # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Table -> m Table # | |
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) BigQuery # | |
Defined in Napkin.Run.BigQuery Methods execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) MsSql # | |
Defined in Napkin.Run.MsSql Methods execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Postgres # | |
Defined in Napkin.Run.Postgres Methods execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Redshift # | |
Defined in Napkin.Run.Redshift Methods execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |
Command NormalizeTableNames (Map (Ref Table) NormalizedTable) Sqlite # | |
Defined in Napkin.Run.Sqlite Methods execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> NormalizeTableNames -> m (Map (Ref Table) NormalizedTable) # | |
TableRenamer (Alias Table) # | |
TableRenamer (Selected Table) # | |
TableRef (Ref Table) # | |
HasDeps (Ref Table) # | |
Defined in Napkin.Types.Deps | |
TableRenamer (Ref Table) # | |
Instances
Data Function # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Function -> c Function # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Function # toConstr :: Function -> Constr # dataTypeOf :: Function -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Function) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Function) # gmapT :: (forall b. Data b => b -> b) -> Function -> Function # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Function -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Function -> r # gmapQ :: (forall d. Data d => d -> u) -> Function -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Function -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Function -> m Function # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Function -> m Function # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Function -> m Function # | |
IsString (Ref Function) # | |
Defined in Napkin.Types.Core Methods fromString :: String -> Ref Function # | |
FoldCase (Ref Function) # | |
keywordRef :: String -> Ref Function #
some functions are keywords and they cannot be
enclosed into default quotes for idens.
(e.g. exists
or not exists
- by default IsString Ref wraps all idens in quotes default for Dialect)
Select something and give it a name; e.g. (my_field as foo)
Constructors
Selected | |
Fields
|
Instances
Foldable Selected # | |||||
Defined in Napkin.Types.Core Methods fold :: Monoid m => Selected m -> m # foldMap :: Monoid m => (a -> m) -> Selected a -> m # foldMap' :: Monoid m => (a -> m) -> Selected a -> m # foldr :: (a -> b -> b) -> b -> Selected a -> b # foldr' :: (a -> b -> b) -> b -> Selected a -> b # foldl :: (b -> a -> b) -> b -> Selected a -> b # foldl' :: (b -> a -> b) -> b -> Selected a -> b # foldr1 :: (a -> a -> a) -> Selected a -> a # foldl1 :: (a -> a -> a) -> Selected a -> a # elem :: Eq a => a -> Selected a -> Bool # maximum :: Ord a => Selected a -> a # minimum :: Ord a => Selected a -> a # | |||||
WithName Selected # | |||||
Defined in Napkin.Types.Core | |||||
Lift a => Lift (Selected a :: Type) # | |||||
Data a => Data (Selected a) # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Selected a -> c (Selected a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Selected a) # toConstr :: Selected a -> Constr # dataTypeOf :: Selected a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Selected a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Selected a)) # gmapT :: (forall b. Data b => b -> b) -> Selected a -> Selected a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Selected a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Selected a -> r # gmapQ :: (forall d. Data d => d -> u) -> Selected a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Selected a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Selected a -> m (Selected a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Selected a -> m (Selected a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Selected a -> m (Selected a) # | |||||
Generic (Selected a) # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show a => Show (Selected a) # | |||||
NFData a => NFData (Selected a) # | |||||
Defined in Napkin.Types.Core | |||||
Eq a => Eq (Selected a) # | |||||
Ord a => Ord (Selected a) # | |||||
HasDeps a => HasDeps (Selected a) # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer (Selected Query) # | |||||
FunRenamer (Selected Relation) # | |||||
FunctionTransformer (Selected Query) # | |||||
FunctionTransformer (Selected Relation) # | |||||
TableRenamer (Selected Query) # | |||||
TableRenamer (Selected Relation) # | |||||
TableRenamer (Selected Table) # | |||||
type Rep (Selected a) # | |||||
Defined in Napkin.Types.Core type Rep (Selected a) = D1 ('MetaData "Selected" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "Selected" 'PrefixI 'True) (S1 ('MetaSel ('Just "_selectRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref a)) :*: S1 ('MetaSel ('Just "_selectItem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) |
Like selected, but aliasing is optional
Constructors
Alias | |
Fields
|
Instances
Foldable Alias # | |||||
Defined in Napkin.Types.Core Methods fold :: Monoid m => Alias m -> m # foldMap :: Monoid m => (a -> m) -> Alias a -> m # foldMap' :: Monoid m => (a -> m) -> Alias a -> m # foldr :: (a -> b -> b) -> b -> Alias a -> b # foldr' :: (a -> b -> b) -> b -> Alias a -> b # foldl :: (b -> a -> b) -> b -> Alias a -> b # foldl' :: (b -> a -> b) -> b -> Alias a -> b # foldr1 :: (a -> a -> a) -> Alias a -> a # foldl1 :: (a -> a -> a) -> Alias a -> a # elem :: Eq a => a -> Alias a -> Bool # maximum :: Ord a => Alias a -> a # minimum :: Ord a => Alias a -> a # | |||||
WithName Alias # | |||||
Defined in Napkin.Types.Core | |||||
Lift a => Lift (Alias a :: Type) # | |||||
Data a => Data (Alias a) # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Alias a -> c (Alias a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Alias a) # toConstr :: Alias a -> Constr # dataTypeOf :: Alias a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Alias a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Alias a)) # gmapT :: (forall b. Data b => b -> b) -> Alias a -> Alias a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alias a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alias a -> r # gmapQ :: (forall d. Data d => d -> u) -> Alias a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Alias a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alias a -> m (Alias a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alias a -> m (Alias a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alias a -> m (Alias a) # | |||||
Generic (Alias a) # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show a => Show (Alias a) # | |||||
NFData a => NFData (Alias a) # | |||||
Defined in Napkin.Types.Core | |||||
Eq a => Eq (Alias a) # | |||||
Ord a => Ord (Alias a) # | |||||
HasDeps (Alias SExp) # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer (Alias SExp) # | |||||
FunctionTransformer (Alias SExp) # | |||||
TableRenamer (Alias SExp) # | |||||
TableRenamer (Alias Table) # | |||||
RenderSql a BigQuery => RenderSql (Alias a) BigQuery # | |||||
RenderSql a MsSql => RenderSql (Alias a) MsSql # | |||||
RenderSql a Postgres => RenderSql (Alias a) Postgres # | |||||
RenderSql a Redshift => RenderSql (Alias a) Redshift # | |||||
RenderSql a Sqlite => RenderSql (Alias a) Sqlite # | |||||
RenderSql (Alias SExp) backend => RenderSql [Alias SExp] backend # | |||||
type Rep (Alias a) # | |||||
Defined in Napkin.Types.Core type Rep (Alias a) = D1 ('MetaData "Alias" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "Alias" 'PrefixI 'True) (S1 ('MetaSel ('Just "_aliasRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Ref a))) :*: S1 ('MetaSel ('Just "_aliasItem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) |
selectToAlias :: Selected a -> Alias a #
data StructField #
Constructors
StructFieldSharp Int | |
StructFieldNamed Text |
Instances
Data StructField # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StructField -> c StructField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StructField # toConstr :: StructField -> Constr # dataTypeOf :: StructField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StructField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StructField) # gmapT :: (forall b. Data b => b -> b) -> StructField -> StructField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StructField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StructField -> r # gmapQ :: (forall d. Data d => d -> u) -> StructField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StructField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StructField -> m StructField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StructField -> m StructField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StructField -> m StructField # | |||||
Generic StructField # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Read StructField # | |||||
Defined in Napkin.Types.Core Methods readsPrec :: Int -> ReadS StructField # readList :: ReadS [StructField] # readPrec :: ReadPrec StructField # readListPrec :: ReadPrec [StructField] # | |||||
Show StructField # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> StructField -> ShowS # show :: StructField -> String # showList :: [StructField] -> ShowS # | |||||
NFData StructField # | |||||
Defined in Napkin.Types.Core Methods rnf :: StructField -> () # | |||||
Eq StructField # | |||||
Defined in Napkin.Types.Core | |||||
Ord StructField # | |||||
Defined in Napkin.Types.Core Methods compare :: StructField -> StructField -> Ordering # (<) :: StructField -> StructField -> Bool # (<=) :: StructField -> StructField -> Bool # (>) :: StructField -> StructField -> Bool # (>=) :: StructField -> StructField -> Bool # max :: StructField -> StructField -> StructField # min :: StructField -> StructField -> StructField # | |||||
Lift StructField # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => StructField -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => StructField -> Code m StructField # | |||||
type Rep StructField # | |||||
Defined in Napkin.Types.Core type Rep StructField = D1 ('MetaData "StructField" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "StructFieldSharp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "StructFieldNamed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
Constructors
VDouble !Double | |
VInt !Int64 | |
VBool !Bool | |
VDate !Day | |
VDateTime !UTCTime | |
VText !SrcLitStr | |
VBinary !ByteString | |
VInterval !Interval | |
VNull | |
VDatePart !DatePart |
Instances
Data Value # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value # dataTypeOf :: Value -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) # gmapT :: (forall b. Data b => b -> b) -> Value -> Value # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r # gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value # | |||||
Generic Value # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Value # | |||||
NFData Value # | |||||
Defined in Napkin.Types.Core | |||||
Buildable Value # | |||||
Defined in Napkin.Types.Core | |||||
Eq Value # | |||||
Ord Value # | |||||
Val Value # | |||||
FromField Value # | |||||
Defined in Napkin.Run.Sqlite Methods | |||||
Lift Value # | |||||
FromField (Named Value) # | |||||
Defined in Napkin.Run.PGCommon Methods fromField :: FieldParser (Named Value) # | |||||
FromRow (Map Text Value) # | |||||
type Rep Value # | |||||
Defined in Napkin.Types.Core type Rep Value = D1 ('MetaData "Value" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (((C1 ('MetaCons "VDouble" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "VInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int64))) :+: (C1 ('MetaCons "VBool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: (C1 ('MetaCons "VDate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day)) :+: C1 ('MetaCons "VDateTime" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 UTCTime))))) :+: ((C1 ('MetaCons "VText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SrcLitStr)) :+: C1 ('MetaCons "VBinary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 ByteString))) :+: (C1 ('MetaCons "VInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Interval)) :+: (C1 ('MetaCons "VNull" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VDatePart" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DatePart)))))) |
Intervals could internally make use of expressions
Constructors
Interval | |
Fields
|
Instances
Data Interval # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Interval -> c Interval # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Interval # toConstr :: Interval -> Constr # dataTypeOf :: Interval -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Interval) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Interval) # gmapT :: (forall b. Data b => b -> b) -> Interval -> Interval # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Interval -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Interval -> r # gmapQ :: (forall d. Data d => d -> u) -> Interval -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Interval -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Interval -> m Interval # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Interval -> m Interval # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Interval -> m Interval # | |||||
Generic Interval # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Interval # | |||||
NFData Interval # | |||||
Defined in Napkin.Types.Core | |||||
Eq Interval # | |||||
Ord Interval # | |||||
Defined in Napkin.Types.Core | |||||
Lift Interval # | |||||
type Rep Interval # | |||||
Defined in Napkin.Types.Core |
data IntInterval #
Constructors
IntInterval SExp DatePart |
Instances
Data IntInterval # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntInterval -> c IntInterval # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntInterval # toConstr :: IntInterval -> Constr # dataTypeOf :: IntInterval -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntInterval) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntInterval) # gmapT :: (forall b. Data b => b -> b) -> IntInterval -> IntInterval # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntInterval -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntInterval -> r # gmapQ :: (forall d. Data d => d -> u) -> IntInterval -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IntInterval -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntInterval -> m IntInterval # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntInterval -> m IntInterval # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntInterval -> m IntInterval # | |
Show IntInterval # | |
Defined in Napkin.Types.Core Methods showsPrec :: Int -> IntInterval -> ShowS # show :: IntInterval -> String # showList :: [IntInterval] -> ShowS # | |
Eq IntInterval # | |
Defined in Napkin.Types.Core | |
Ord IntInterval # | |
Defined in Napkin.Types.Core Methods compare :: IntInterval -> IntInterval -> Ordering # (<) :: IntInterval -> IntInterval -> Bool # (<=) :: IntInterval -> IntInterval -> Bool # (>) :: IntInterval -> IntInterval -> Bool # (>=) :: IntInterval -> IntInterval -> Bool # max :: IntInterval -> IntInterval -> IntInterval # min :: IntInterval -> IntInterval -> IntInterval # | |
Val IntInterval # | |
Defined in Napkin.Types.Core Methods val :: Prism' Value IntInterval # |
BigQuery array index can be 0-based or 1-based
Constructors
ArrayBase0 | |
ArrayBase1 |
Instances
Data ArrayBase # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArrayBase -> c ArrayBase # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArrayBase # toConstr :: ArrayBase -> Constr # dataTypeOf :: ArrayBase -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArrayBase) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArrayBase) # gmapT :: (forall b. Data b => b -> b) -> ArrayBase -> ArrayBase # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArrayBase -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArrayBase -> r # gmapQ :: (forall d. Data d => d -> u) -> ArrayBase -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArrayBase -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArrayBase -> m ArrayBase # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArrayBase -> m ArrayBase # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArrayBase -> m ArrayBase # | |
Generic ArrayBase # | |
Defined in Napkin.Types.Core | |
Show ArrayBase # | |
NFData ArrayBase # | |
Defined in Napkin.Types.Core | |
Eq ArrayBase # | |
Ord ArrayBase # | |
Lift ArrayBase # | |
type Rep ArrayBase # | |
data Nullability #
Instances
Data Nullability # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Nullability -> c Nullability # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Nullability # toConstr :: Nullability -> Constr # dataTypeOf :: Nullability -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Nullability) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Nullability) # gmapT :: (forall b. Data b => b -> b) -> Nullability -> Nullability # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Nullability -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Nullability -> r # gmapQ :: (forall d. Data d => d -> u) -> Nullability -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Nullability -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Nullability -> m Nullability # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Nullability -> m Nullability # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Nullability -> m Nullability # | |||||
Generic Nullability # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Nullability # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> Nullability -> ShowS # show :: Nullability -> String # showList :: [Nullability] -> ShowS # | |||||
NFData Nullability # | |||||
Defined in Napkin.Types.Core Methods rnf :: Nullability -> () # | |||||
Eq Nullability # | |||||
Defined in Napkin.Types.Core | |||||
Ord Nullability # | |||||
Defined in Napkin.Types.Core Methods compare :: Nullability -> Nullability -> Ordering # (<) :: Nullability -> Nullability -> Bool # (<=) :: Nullability -> Nullability -> Bool # (>) :: Nullability -> Nullability -> Bool # (>=) :: Nullability -> Nullability -> Bool # max :: Nullability -> Nullability -> Nullability # min :: Nullability -> Nullability -> Nullability # | |||||
Lift Nullability # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => Nullability -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Nullability -> Code m Nullability # | |||||
type Rep Nullability # | |||||
Constructors
Field Nullability Type |
Constructors
Lit Value | |
Var (Ref SExp) | |
ArraySelect Query | |
ArrayItem | |
Array | |
Fields | |
Struct | |
Fields | |
FieldAccess | |
Fields | |
Extern ExternFun | external function call |
Case [(SExp, SExp)] SExp | case with a final default |
ExceptColumns SExp [Ref SExp] | t.* EXCEPT(a,b,c) |
SubQuery Query | |
NativeExpr NativeExpr |
Instances
Data SExp # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SExp -> c SExp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SExp # dataTypeOf :: SExp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SExp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SExp) # gmapT :: (forall b. Data b => b -> b) -> SExp -> SExp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SExp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SExp -> r # gmapQ :: (forall d. Data d => d -> u) -> SExp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SExp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SExp -> m SExp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SExp -> m SExp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SExp -> m SExp # | |||||
Generic SExp # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Num SExp # | |||||
Fractional SExp # | |||||
Show SExp # | |||||
NFData SExp # | |||||
Defined in Napkin.Types.Core | |||||
Eq SExp # | |||||
Ord SExp # | |||||
HasDeps SExp # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer SExp # | |||||
FunctionTransformer SExp # | |||||
TableRenamer SExp # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
RenderSql SExp BigQuery # | |||||
RenderSql SExp MsSql # | |||||
RenderSql SExp Postgres # | |||||
RenderSql SExp Redshift # | |||||
RenderSql SExp Sqlite # | |||||
Lift SExp # | |||||
HasDeps (Alias SExp) # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer (Alias SExp) # | |||||
FunctionTransformer (Alias SExp) # | |||||
TableRenamer (Alias SExp) # | |||||
RenderSql (Alias SExp) backend => RenderSql [Alias SExp] backend # | |||||
HasDeps (OMap Name SExp) # | |||||
type Rep SExp # | |||||
Defined in Napkin.Types.Core type Rep SExp = D1 ('MetaData "SExp" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (((C1 ('MetaCons "Lit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref SExp))) :+: C1 ('MetaCons "ArraySelect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Query)))) :+: (C1 ('MetaCons "ArrayItem" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_sExp_ArrayItem_base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ArrayBase) :*: S1 ('MetaSel ('Just "_sExp_ArrayItem_null") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nullability)) :*: (S1 ('MetaSel ('Just "_sExp_ArrayItem_arr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: S1 ('MetaSel ('Just "_sExp_ArrayItem_idx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp))) :+: (C1 ('MetaCons "Array" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sExp_Array_itemType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Type)) :*: S1 ('MetaSel ('Just "_sExp_Array_items") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SExp])) :+: C1 ('MetaCons "Struct" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sExp_Struct_types") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (OMap StructField Type))) :*: S1 ('MetaSel ('Just "_sExp_Struct_values") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OMap StructField SExp)))))) :+: ((C1 ('MetaCons "FieldAccess" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sExp_fieldAccess_base") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: S1 ('MetaSel ('Just "_sExp_fieldAccess_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StructField)) :+: (C1 ('MetaCons "Extern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExternFun)) :+: C1 ('MetaCons "Case" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(SExp, SExp)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp)))) :+: (C1 ('MetaCons "ExceptColumns" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ref SExp])) :+: (C1 ('MetaCons "SubQuery" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Query)) :+: C1 ('MetaCons "NativeExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NativeExpr)))))) |
data NativeExpr #
Constructors
PostgresAExpr AExpr | |
SimpleSQLParserScalarExpr ScalarExpr |
Instances
Data NativeExpr # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NativeExpr -> c NativeExpr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NativeExpr # toConstr :: NativeExpr -> Constr # dataTypeOf :: NativeExpr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NativeExpr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NativeExpr) # gmapT :: (forall b. Data b => b -> b) -> NativeExpr -> NativeExpr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NativeExpr -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NativeExpr -> r # gmapQ :: (forall d. Data d => d -> u) -> NativeExpr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NativeExpr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NativeExpr -> m NativeExpr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NativeExpr -> m NativeExpr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NativeExpr -> m NativeExpr # | |||||
Generic NativeExpr # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show NativeExpr # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> NativeExpr -> ShowS # show :: NativeExpr -> String # showList :: [NativeExpr] -> ShowS # | |||||
NFData NativeExpr # | |||||
Defined in Napkin.Types.Core Methods rnf :: NativeExpr -> () # | |||||
Eq NativeExpr # | |||||
Defined in Napkin.Types.Core | |||||
Ord NativeExpr # | |||||
Defined in Napkin.Types.Core Methods compare :: NativeExpr -> NativeExpr -> Ordering # (<) :: NativeExpr -> NativeExpr -> Bool # (<=) :: NativeExpr -> NativeExpr -> Bool # (>) :: NativeExpr -> NativeExpr -> Bool # (>=) :: NativeExpr -> NativeExpr -> Bool # max :: NativeExpr -> NativeExpr -> NativeExpr # min :: NativeExpr -> NativeExpr -> NativeExpr # | |||||
ToDbBackend anyBackend => RenderSql NativeExpr anyBackend # | |||||
Defined in Napkin.Render.Native Methods renderSql :: anyBackend -> NativeExpr -> ME Doc # | |||||
Lift NativeExpr # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => NativeExpr -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NativeExpr -> Code m NativeExpr # | |||||
type Rep NativeExpr # | |||||
Defined in Napkin.Types.Core type Rep NativeExpr = D1 ('MetaData "NativeExpr" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "PostgresAExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AExpr)) :+: C1 ('MetaCons "SimpleSQLParserScalarExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScalarExpr))) |
data NullStrategy #
Constructors
IgnoreNulls | |
RespectNulls |
Instances
Data NullStrategy # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NullStrategy -> c NullStrategy # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NullStrategy # toConstr :: NullStrategy -> Constr # dataTypeOf :: NullStrategy -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NullStrategy) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NullStrategy) # gmapT :: (forall b. Data b => b -> b) -> NullStrategy -> NullStrategy # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NullStrategy -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NullStrategy -> r # gmapQ :: (forall d. Data d => d -> u) -> NullStrategy -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NullStrategy -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NullStrategy -> m NullStrategy # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NullStrategy -> m NullStrategy # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NullStrategy -> m NullStrategy # | |||||
Generic NullStrategy # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show NullStrategy # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> NullStrategy -> ShowS # show :: NullStrategy -> String # showList :: [NullStrategy] -> ShowS # | |||||
NFData NullStrategy # | |||||
Defined in Napkin.Types.Core Methods rnf :: NullStrategy -> () # | |||||
Eq NullStrategy # | |||||
Defined in Napkin.Types.Core | |||||
Ord NullStrategy # | |||||
Defined in Napkin.Types.Core Methods compare :: NullStrategy -> NullStrategy -> Ordering # (<) :: NullStrategy -> NullStrategy -> Bool # (<=) :: NullStrategy -> NullStrategy -> Bool # (>) :: NullStrategy -> NullStrategy -> Bool # (>=) :: NullStrategy -> NullStrategy -> Bool # max :: NullStrategy -> NullStrategy -> NullStrategy # min :: NullStrategy -> NullStrategy -> NullStrategy # | |||||
CombiBomb NullStrategy # | |||||
Defined in Napkin.Backends.MsSql.ApiGen.Types Methods toParensOperatorArgs :: NullStrategy -> [ParensOperatorArgument] # | |||||
Lift NullStrategy # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => NullStrategy -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NullStrategy -> Code m NullStrategy # | |||||
type Rep NullStrategy # | |||||
data Distinctness #
Constructors
Distinct | |
NonDistinct |
Instances
Data Distinctness # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Distinctness -> c Distinctness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Distinctness # toConstr :: Distinctness -> Constr # dataTypeOf :: Distinctness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Distinctness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Distinctness) # gmapT :: (forall b. Data b => b -> b) -> Distinctness -> Distinctness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Distinctness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Distinctness -> r # gmapQ :: (forall d. Data d => d -> u) -> Distinctness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Distinctness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Distinctness -> m Distinctness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Distinctness -> m Distinctness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Distinctness -> m Distinctness # | |||||
Generic Distinctness # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Distinctness # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> Distinctness -> ShowS # show :: Distinctness -> String # showList :: [Distinctness] -> ShowS # | |||||
Default Distinctness # | |||||
Defined in Napkin.Types.Core Methods def :: Distinctness # | |||||
NFData Distinctness # | |||||
Defined in Napkin.Types.Core Methods rnf :: Distinctness -> () # | |||||
Eq Distinctness # | |||||
Defined in Napkin.Types.Core | |||||
Ord Distinctness # | |||||
Defined in Napkin.Types.Core Methods compare :: Distinctness -> Distinctness -> Ordering # (<) :: Distinctness -> Distinctness -> Bool # (<=) :: Distinctness -> Distinctness -> Bool # (>) :: Distinctness -> Distinctness -> Bool # (>=) :: Distinctness -> Distinctness -> Bool # max :: Distinctness -> Distinctness -> Distinctness # min :: Distinctness -> Distinctness -> Distinctness # | |||||
CombiBomb Distinctness # | |||||
Defined in Napkin.Backends.MsSql.ApiGen.Types Methods toParensOperatorArgs :: Distinctness -> [ParensOperatorArgument] # | |||||
Lift Distinctness # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => Distinctness -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Distinctness -> Code m Distinctness # | |||||
type Rep Distinctness # | |||||
Constructors
WOver | |
Fields |
Instances
Data WOver # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WOver -> c WOver # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WOver # dataTypeOf :: WOver -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WOver) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WOver) # gmapT :: (forall b. Data b => b -> b) -> WOver -> WOver # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WOver -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WOver -> r # gmapQ :: (forall d. Data d => d -> u) -> WOver -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WOver -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WOver -> m WOver # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WOver -> m WOver # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WOver -> m WOver # | |||||
Generic WOver # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show WOver # | |||||
Default WOver # | |||||
Defined in Napkin.Types.Core | |||||
NFData WOver # | |||||
Defined in Napkin.Types.Core | |||||
Eq WOver # | |||||
Ord WOver # | |||||
Lift WOver # | |||||
type Rep WOver # | |||||
Defined in Napkin.Types.Core type Rep WOver = D1 ('MetaData "WOver" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "WOver" 'PrefixI 'True) (S1 ('MetaSel ('Just "_overPartition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Partition) :*: (S1 ('MetaSel ('Just "_overOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Order) :*: S1 ('MetaSel ('Just "_overFrame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe WindowFrame))))) |
data WindowFrameUnit #
Constructors
WindowRows | |
WindowRange |
Instances
Data WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WindowFrameUnit -> c WindowFrameUnit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WindowFrameUnit # toConstr :: WindowFrameUnit -> Constr # dataTypeOf :: WindowFrameUnit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WindowFrameUnit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WindowFrameUnit) # gmapT :: (forall b. Data b => b -> b) -> WindowFrameUnit -> WindowFrameUnit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WindowFrameUnit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WindowFrameUnit -> r # gmapQ :: (forall d. Data d => d -> u) -> WindowFrameUnit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WindowFrameUnit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WindowFrameUnit -> m WindowFrameUnit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFrameUnit -> m WindowFrameUnit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFrameUnit -> m WindowFrameUnit # | |||||
Generic WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Associated Types
Methods from :: WindowFrameUnit -> Rep WindowFrameUnit x # to :: Rep WindowFrameUnit x -> WindowFrameUnit # | |||||
Show WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> WindowFrameUnit -> ShowS # show :: WindowFrameUnit -> String # showList :: [WindowFrameUnit] -> ShowS # | |||||
NFData WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods rnf :: WindowFrameUnit -> () # | |||||
Eq WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods (==) :: WindowFrameUnit -> WindowFrameUnit -> Bool # (/=) :: WindowFrameUnit -> WindowFrameUnit -> Bool # | |||||
Ord WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods compare :: WindowFrameUnit -> WindowFrameUnit -> Ordering # (<) :: WindowFrameUnit -> WindowFrameUnit -> Bool # (<=) :: WindowFrameUnit -> WindowFrameUnit -> Bool # (>) :: WindowFrameUnit -> WindowFrameUnit -> Bool # (>=) :: WindowFrameUnit -> WindowFrameUnit -> Bool # max :: WindowFrameUnit -> WindowFrameUnit -> WindowFrameUnit # min :: WindowFrameUnit -> WindowFrameUnit -> WindowFrameUnit # | |||||
Lift WindowFrameUnit # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => WindowFrameUnit -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => WindowFrameUnit -> Code m WindowFrameUnit # | |||||
type Rep WindowFrameUnit # | |||||
Constructors
SimpleWindow (Ref Function) [SExp] WOver (Maybe NullStrategy) |
Instances
Data WindowFun # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WindowFun -> c WindowFun # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WindowFun # toConstr :: WindowFun -> Constr # dataTypeOf :: WindowFun -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WindowFun) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WindowFun) # gmapT :: (forall b. Data b => b -> b) -> WindowFun -> WindowFun # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WindowFun -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WindowFun -> r # gmapQ :: (forall d. Data d => d -> u) -> WindowFun -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WindowFun -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WindowFun -> m WindowFun # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFun -> m WindowFun # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFun -> m WindowFun # | |||||
Generic WindowFun # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show WindowFun # | |||||
NFData WindowFun # | |||||
Defined in Napkin.Types.Core | |||||
Eq WindowFun # | |||||
Ord WindowFun # | |||||
HasDeps WindowFun # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer WindowFun # | |||||
TableRenamer WindowFun # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
Lift WindowFun # | |||||
type Rep WindowFun # | |||||
Defined in Napkin.Types.Core type Rep WindowFun = D1 ('MetaData "WindowFun" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "SimpleWindow" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Function)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SExp])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WOver) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe NullStrategy))))) |
data WindowFrame #
Constructors
WindowBetween WindowFrameUnit FrameLength FrameLength | |
WindowFrom WindowFrameUnit FrameLength |
Instances
Data WindowFrame # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WindowFrame -> c WindowFrame # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WindowFrame # toConstr :: WindowFrame -> Constr # dataTypeOf :: WindowFrame -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WindowFrame) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WindowFrame) # gmapT :: (forall b. Data b => b -> b) -> WindowFrame -> WindowFrame # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WindowFrame -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WindowFrame -> r # gmapQ :: (forall d. Data d => d -> u) -> WindowFrame -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WindowFrame -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WindowFrame -> m WindowFrame # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFrame -> m WindowFrame # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WindowFrame -> m WindowFrame # | |||||
Generic WindowFrame # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show WindowFrame # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> WindowFrame -> ShowS # show :: WindowFrame -> String # showList :: [WindowFrame] -> ShowS # | |||||
NFData WindowFrame # | |||||
Defined in Napkin.Types.Core Methods rnf :: WindowFrame -> () # | |||||
Eq WindowFrame # | |||||
Defined in Napkin.Types.Core | |||||
Ord WindowFrame # | |||||
Defined in Napkin.Types.Core Methods compare :: WindowFrame -> WindowFrame -> Ordering # (<) :: WindowFrame -> WindowFrame -> Bool # (<=) :: WindowFrame -> WindowFrame -> Bool # (>) :: WindowFrame -> WindowFrame -> Bool # (>=) :: WindowFrame -> WindowFrame -> Bool # max :: WindowFrame -> WindowFrame -> WindowFrame # min :: WindowFrame -> WindowFrame -> WindowFrame # | |||||
Lift WindowFrame # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => WindowFrame -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => WindowFrame -> Code m WindowFrame # | |||||
type Rep WindowFrame # | |||||
Defined in Napkin.Types.Core type Rep WindowFrame = D1 ('MetaData "WindowFrame" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "WindowBetween" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowFrameUnit) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FrameLength) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FrameLength))) :+: C1 ('MetaCons "WindowFrom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowFrameUnit) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FrameLength))) |
data FrameLength #
Constructors
CurrentRow | |
Unbounded | |
LimitedPreceding SExp | |
LimitedFollowing SExp |
Instances
Data FrameLength # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FrameLength -> c FrameLength # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FrameLength # toConstr :: FrameLength -> Constr # dataTypeOf :: FrameLength -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FrameLength) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FrameLength) # gmapT :: (forall b. Data b => b -> b) -> FrameLength -> FrameLength # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FrameLength -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FrameLength -> r # gmapQ :: (forall d. Data d => d -> u) -> FrameLength -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FrameLength -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FrameLength -> m FrameLength # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FrameLength -> m FrameLength # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FrameLength -> m FrameLength # | |||||
Generic FrameLength # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show FrameLength # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> FrameLength -> ShowS # show :: FrameLength -> String # showList :: [FrameLength] -> ShowS # | |||||
NFData FrameLength # | |||||
Defined in Napkin.Types.Core Methods rnf :: FrameLength -> () # | |||||
Eq FrameLength # | |||||
Defined in Napkin.Types.Core | |||||
Ord FrameLength # | |||||
Defined in Napkin.Types.Core Methods compare :: FrameLength -> FrameLength -> Ordering # (<) :: FrameLength -> FrameLength -> Bool # (<=) :: FrameLength -> FrameLength -> Bool # (>) :: FrameLength -> FrameLength -> Bool # (>=) :: FrameLength -> FrameLength -> Bool # max :: FrameLength -> FrameLength -> FrameLength # min :: FrameLength -> FrameLength -> FrameLength # | |||||
Lift FrameLength # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => FrameLength -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => FrameLength -> Code m FrameLength # | |||||
type Rep FrameLength # | |||||
Defined in Napkin.Types.Core type Rep FrameLength = D1 ('MetaData "FrameLength" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "CurrentRow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Unbounded" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LimitedPreceding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp)) :+: C1 ('MetaCons "LimitedFollowing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp)))) |
data FunModifier #
Constructors
ModDistinct Distinctness | |
ModNulls NullStrategy | |
ModOrder Order | |
ModLimit Int | |
ModOver WOver |
Instances
Data FunModifier # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunModifier -> c FunModifier # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunModifier # toConstr :: FunModifier -> Constr # dataTypeOf :: FunModifier -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunModifier) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunModifier) # gmapT :: (forall b. Data b => b -> b) -> FunModifier -> FunModifier # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunModifier -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunModifier -> r # gmapQ :: (forall d. Data d => d -> u) -> FunModifier -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FunModifier -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunModifier -> m FunModifier # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunModifier -> m FunModifier # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunModifier -> m FunModifier # | |||||
Generic FunModifier # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show FunModifier # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> FunModifier -> ShowS # show :: FunModifier -> String # showList :: [FunModifier] -> ShowS # | |||||
NFData FunModifier # | |||||
Defined in Napkin.Types.Core Methods rnf :: FunModifier -> () # | |||||
Eq FunModifier # | |||||
Defined in Napkin.Types.Core | |||||
Ord FunModifier # | |||||
Defined in Napkin.Types.Core Methods compare :: FunModifier -> FunModifier -> Ordering # (<) :: FunModifier -> FunModifier -> Bool # (<=) :: FunModifier -> FunModifier -> Bool # (>) :: FunModifier -> FunModifier -> Bool # (>=) :: FunModifier -> FunModifier -> Bool # max :: FunModifier -> FunModifier -> FunModifier # min :: FunModifier -> FunModifier -> FunModifier # | |||||
Lift FunModifier # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => FunModifier -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => FunModifier -> Code m FunModifier # | |||||
type Rep FunModifier # | |||||
Defined in Napkin.Types.Core type Rep FunModifier = D1 ('MetaData "FunModifier" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "ModDistinct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Distinctness)) :+: C1 ('MetaCons "ModNulls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NullStrategy))) :+: (C1 ('MetaCons "ModOrder" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Order)) :+: (C1 ('MetaCons "ModLimit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "ModOver" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WOver))))) |
Constructors
SimpleExtern (Ref Function) [SExp] | |
ParensExtern [ParensOperator] | |
ModExtern (Ref Function) [SExp] [FunModifier] | |
Cast SExp Type | |
SafeCast SExp Type | |
ExternWindow WindowFun | |
ExternRaw String |
Instances
Data ExternFun # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ExternFun -> c ExternFun # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ExternFun # toConstr :: ExternFun -> Constr # dataTypeOf :: ExternFun -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ExternFun) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExternFun) # gmapT :: (forall b. Data b => b -> b) -> ExternFun -> ExternFun # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ExternFun -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ExternFun -> r # gmapQ :: (forall d. Data d => d -> u) -> ExternFun -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ExternFun -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ExternFun -> m ExternFun # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ExternFun -> m ExternFun # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ExternFun -> m ExternFun # | |||||
Generic ExternFun # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show ExternFun # | |||||
NFData ExternFun # | |||||
Defined in Napkin.Types.Core | |||||
Eq ExternFun # | |||||
Ord ExternFun # | |||||
HasDeps ExternFun # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer ExternFun # | |||||
TableRenamer ExternFun # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
RenderSql ExternFun Postgres # | |||||
RenderSql ExternFun Redshift # | |||||
Lift ExternFun # | |||||
type Rep ExternFun # | |||||
Defined in Napkin.Types.Core type Rep ExternFun = D1 ('MetaData "ExternFun" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "SimpleExtern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Function)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SExp])) :+: (C1 ('MetaCons "ParensExtern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ParensOperator])) :+: C1 ('MetaCons "ModExtern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Function)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SExp]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunModifier]))))) :+: ((C1 ('MetaCons "Cast" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "SafeCast" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :+: (C1 ('MetaCons "ExternWindow" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WindowFun)) :+: C1 ('MetaCons "ExternRaw" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))) |
type OriginTypeName = Text #
Constructors
TySmallInt | |
TyInteger | |
TyBigInt | |
TyDecimal | |
TyReal | |
TyDouble | |
TyBool | |
TyChar | |
TyVarChar | |
TyBlob | |
TyUnknown OriginTypeName | |
TyVarCharWithLen Int | |
TyDate | |
TyTimestamp | |
TyDatetime | |
TyInterval | |
TyLimited Type Int | |
Ty2DLimited Type Int Int | |
TyArray Type (Maybe Int) | |
TyStruct (OMap StructField Type) |
Instances
Data Type # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type # dataTypeOf :: Type -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) # gmapT :: (forall b. Data b => b -> b) -> Type -> Type # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r # gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type # | |||||
Generic Type # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Type # | |||||
NFData Type # | |||||
Defined in Napkin.Types.Core | |||||
Eq Type # | |||||
Ord Type # | |||||
Lift Type # | |||||
type Rep Type # | |||||
Defined in Napkin.Types.Core type Rep Type = D1 ('MetaData "Type" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((((C1 ('MetaCons "TySmallInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyInteger" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TyBigInt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyDecimal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyReal" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TyDouble" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyBool" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TyChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyVarChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyBlob" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TyUnknown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OriginTypeName)) :+: C1 ('MetaCons "TyVarCharWithLen" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "TyDate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyTimestamp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyDatetime" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TyInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyLimited" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "Ty2DLimited" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "TyArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :+: C1 ('MetaCons "TyStruct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OMap StructField Type)))))))) |
Constructors
Millennium | |
Century | |
Decade | |
Epoch | |
Year | |
Quarter | |
Month | |
Week | |
DayOfWeek | |
DayOfYear | |
Day | |
Hour | |
Minute | |
Second | |
Millisecond | |
Microsecond |
Instances
Data DatePart # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DatePart -> c DatePart # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DatePart # toConstr :: DatePart -> Constr # dataTypeOf :: DatePart -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DatePart) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DatePart) # gmapT :: (forall b. Data b => b -> b) -> DatePart -> DatePart # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DatePart -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DatePart -> r # gmapQ :: (forall d. Data d => d -> u) -> DatePart -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DatePart -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DatePart -> m DatePart # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DatePart -> m DatePart # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DatePart -> m DatePart # | |||||
Generic DatePart # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show DatePart # | |||||
NFData DatePart # | |||||
Defined in Napkin.Types.Core | |||||
Eq DatePart # | |||||
Ord DatePart # | |||||
Defined in Napkin.Types.Core | |||||
Val DatePart # | |||||
Lift DatePart # | |||||
type Rep DatePart # | |||||
Defined in Napkin.Types.Core type Rep DatePart = D1 ('MetaData "DatePart" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((((C1 ('MetaCons "Millennium" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Century" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Decade" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Epoch" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Year" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Quarter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Month" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Week" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "DayOfWeek" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DayOfYear" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Day" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Hour" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Minute" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Second" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Millisecond" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Microsecond" 'PrefixI 'False) (U1 :: Type -> Type))))) |
Instances
Data OrderDir # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OrderDir -> c OrderDir # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OrderDir # toConstr :: OrderDir -> Constr # dataTypeOf :: OrderDir -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OrderDir) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderDir) # gmapT :: (forall b. Data b => b -> b) -> OrderDir -> OrderDir # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OrderDir -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OrderDir -> r # gmapQ :: (forall d. Data d => d -> u) -> OrderDir -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OrderDir -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OrderDir -> m OrderDir # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderDir -> m OrderDir # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderDir -> m OrderDir # | |
Generic OrderDir # | |
Defined in Napkin.Types.Core | |
Show OrderDir # | |
NFData OrderDir # | |
Defined in Napkin.Types.Core | |
Eq OrderDir # | |
Ord OrderDir # | |
Defined in Napkin.Types.Core | |
CombiBomb OrderDir # | |
Defined in Napkin.Backends.MsSql.ApiGen.Types Methods toParensOperatorArgs :: OrderDir -> [ParensOperatorArgument] # | |
Lift OrderDir # | |
type Rep OrderDir # | |
invertOrder :: OrderDir -> OrderDir #
Flip order
Constructors
NullsFirst | |
NullsLast |
Instances
Data NullOrder # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NullOrder -> c NullOrder # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NullOrder # toConstr :: NullOrder -> Constr # dataTypeOf :: NullOrder -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NullOrder) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NullOrder) # gmapT :: (forall b. Data b => b -> b) -> NullOrder -> NullOrder # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NullOrder -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NullOrder -> r # gmapQ :: (forall d. Data d => d -> u) -> NullOrder -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NullOrder -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NullOrder -> m NullOrder # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NullOrder -> m NullOrder # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NullOrder -> m NullOrder # | |
Generic NullOrder # | |
Defined in Napkin.Types.Core | |
Show NullOrder # | |
NFData NullOrder # | |
Defined in Napkin.Types.Core | |
Eq NullOrder # | |
Ord NullOrder # | |
Lift NullOrder # | |
type Rep NullOrder # | |
Instances
Data OrderPart # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OrderPart -> c OrderPart # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OrderPart # toConstr :: OrderPart -> Constr # dataTypeOf :: OrderPart -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OrderPart) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderPart) # gmapT :: (forall b. Data b => b -> b) -> OrderPart -> OrderPart # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OrderPart -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OrderPart -> r # gmapQ :: (forall d. Data d => d -> u) -> OrderPart -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OrderPart -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OrderPart -> m OrderPart # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderPart -> m OrderPart # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OrderPart -> m OrderPart # | |||||
Generic OrderPart # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show OrderPart # | |||||
NFData OrderPart # | |||||
Defined in Napkin.Types.Core | |||||
Eq OrderPart # | |||||
Ord OrderPart # | |||||
FunRenamer OrderPart # | |||||
FunctionTransformer OrderPart # | |||||
TableRenamer OrderPart # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
Lift OrderPart # | |||||
type Rep OrderPart # | |||||
Defined in Napkin.Types.Core type Rep OrderPart = D1 ('MetaData "OrderPart" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "OrderPart" 'PrefixI 'True) (S1 ('MetaSel ('Just "_opExp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp) :*: (S1 ('MetaSel ('Just "_opOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OrderDir) :*: S1 ('MetaSel ('Just "_opNulls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe NullOrder))))) |
Constructors
TableRelation (Ref Table) | |
QueryRelation Query | |
ArrayRelation SExp | |
RawRelation [Ref Table] String | Escape hatch: A raw relation with its dependencies. Avoid if possible |
Instances
Data Relation # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Relation -> c Relation # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Relation # toConstr :: Relation -> Constr # dataTypeOf :: Relation -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Relation) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Relation) # gmapT :: (forall b. Data b => b -> b) -> Relation -> Relation # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Relation -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Relation -> r # gmapQ :: (forall d. Data d => d -> u) -> Relation -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Relation -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Relation -> m Relation # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Relation -> m Relation # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Relation -> m Relation # | |||||
IsString Relation # | |||||
Defined in Napkin.Types.Core Methods fromString :: String -> Relation # | |||||
Generic Relation # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Relation # | |||||
NFData Relation # | |||||
Defined in Napkin.Types.Core | |||||
Eq Relation # | |||||
Ord Relation # | |||||
Defined in Napkin.Types.Core | |||||
AsRelation Relation # | |||||
Defined in Napkin.Types.Core Methods asRelation :: Relation -> Relation # | |||||
MaybeQuery Relation # | |||||
HasDeps Relation # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer Relation # | |||||
FunctionTransformer Relation # | |||||
TableRenamer Relation # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
RenderSql Relation BigQuery # | |||||
RenderSql Relation MsSql # | |||||
RenderSql Relation Postgres # | |||||
RenderSql Relation Redshift # | |||||
RenderSql Relation Sqlite # | |||||
Lift Relation # | |||||
FunRenamer (Selected Relation) # | |||||
FunctionTransformer (Selected Relation) # | |||||
TableRenamer (Selected Relation) # | |||||
type Rep Relation # | |||||
Defined in Napkin.Types.Core type Rep Relation = D1 ('MetaData "Relation" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "TableRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ref Table))) :+: C1 ('MetaCons "QueryRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Query))) :+: (C1 ('MetaCons "ArrayRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExp)) :+: C1 ('MetaCons "RawRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ref Table]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) |
Instances
Data JoinType # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoinType -> c JoinType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoinType # toConstr :: JoinType -> Constr # dataTypeOf :: JoinType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoinType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinType) # gmapT :: (forall b. Data b => b -> b) -> JoinType -> JoinType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQ :: (forall d. Data d => d -> u) -> JoinType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # | |||||
Generic JoinType # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show JoinType # | |||||
NFData JoinType # | |||||
Defined in Napkin.Types.Core | |||||
Eq JoinType # | |||||
Ord JoinType # | |||||
Defined in Napkin.Types.Core | |||||
Lift JoinType # | |||||
type Rep JoinType # | |||||
Defined in Napkin.Types.Core type Rep JoinType = D1 ('MetaData "JoinType" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "JoinLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoinRight" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JoinInner" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JoinCross" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JoinOuter" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Constructors
From (Selected Relation) [(Selected Relation, JoinType, Either (Maybe SExp) [Ref SExp])] |
Instances
Data From # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> From -> c From # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c From # dataTypeOf :: From -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c From) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c From) # gmapT :: (forall b. Data b => b -> b) -> From -> From # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> From -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> From -> r # gmapQ :: (forall d. Data d => d -> u) -> From -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> From -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> From -> m From # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> From -> m From # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> From -> m From # | |||||
Generic From # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show From # | |||||
NFData From # | |||||
Defined in Napkin.Types.Core | |||||
Eq From # | |||||
Ord From # | |||||
HasDeps From # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer From # | |||||
FunctionTransformer From # | |||||
TableRenamer From # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
RenderSql From BigQuery # | |||||
RenderSql From MsSql # | |||||
RenderSql From Postgres # | |||||
RenderSql From Redshift # | |||||
RenderSql From Sqlite # | |||||
Lift From # | |||||
type Rep From # | |||||
Defined in Napkin.Types.Core type Rep From = D1 ('MetaData "From" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "From" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Selected Relation)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Selected Relation, JoinType, Either (Maybe SExp) [Ref SExp])]))) |
fromAliases :: From -> [Ref Relation] #
Constructors
SetUnion | |
DuplicateUnion | |
IntersectUnion | |
MinusUnion |
Instances
Data UnionType # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnionType -> c UnionType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnionType # toConstr :: UnionType -> Constr # dataTypeOf :: UnionType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnionType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnionType) # gmapT :: (forall b. Data b => b -> b) -> UnionType -> UnionType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnionType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnionType -> r # gmapQ :: (forall d. Data d => d -> u) -> UnionType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UnionType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnionType -> m UnionType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnionType -> m UnionType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnionType -> m UnionType # | |||||
Generic UnionType # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show UnionType # | |||||
NFData UnionType # | |||||
Defined in Napkin.Types.Core | |||||
Eq UnionType # | |||||
Ord UnionType # | |||||
Lift UnionType # | |||||
type Rep UnionType # | |||||
Defined in Napkin.Types.Core type Rep UnionType = D1 ('MetaData "UnionType" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "SetUnion" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DuplicateUnion" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IntersectUnion" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MinusUnion" 'PrefixI 'False) (U1 :: Type -> Type))) |
Constructors
RawQuery | |
Fields
|
Instances
Data RawQuery # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RawQuery -> c RawQuery # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RawQuery # toConstr :: RawQuery -> Constr # dataTypeOf :: RawQuery -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RawQuery) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RawQuery) # gmapT :: (forall b. Data b => b -> b) -> RawQuery -> RawQuery # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RawQuery -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RawQuery -> r # gmapQ :: (forall d. Data d => d -> u) -> RawQuery -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RawQuery -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RawQuery -> m RawQuery # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RawQuery -> m RawQuery # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RawQuery -> m RawQuery # | |||||
Generic RawQuery # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show RawQuery # | |||||
NFData RawQuery # | |||||
Defined in Napkin.Types.Core | |||||
Eq RawQuery # | |||||
Ord RawQuery # | |||||
Defined in Napkin.Types.Core | |||||
Lift RawQuery # | |||||
type Rep RawQuery # | |||||
Defined in Napkin.Types.Core type Rep RawQuery = D1 ('MetaData "RawQuery" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "RawQuery" 'PrefixI 'True) (S1 ('MetaSel ('Just "_rawQuery_deps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ref Table]) :*: S1 ('MetaSel ('Just "_rawQuery_raw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) |
Constructors
JustCteBody (Selected Query) | |
PositionalBoundsCteBody (NonEmpty (Ref SExp)) (Selected Query) |
Instances
Data CteBody # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CteBody -> c CteBody # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CteBody # toConstr :: CteBody -> Constr # dataTypeOf :: CteBody -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CteBody) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CteBody) # gmapT :: (forall b. Data b => b -> b) -> CteBody -> CteBody # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CteBody -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CteBody -> r # gmapQ :: (forall d. Data d => d -> u) -> CteBody -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CteBody -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CteBody -> m CteBody # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CteBody -> m CteBody # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CteBody -> m CteBody # | |||||
Generic CteBody # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show CteBody # | |||||
NFData CteBody # | |||||
Defined in Napkin.Types.Core | |||||
Eq CteBody # | |||||
Ord CteBody # | |||||
HasDeps CteBody # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer CteBody # | |||||
FunctionTransformer CteBody # | |||||
TableRenamer CteBody # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
Lift CteBody # | |||||
type Rep CteBody # | |||||
Defined in Napkin.Types.Core type Rep CteBody = D1 ('MetaData "CteBody" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "JustCteBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Selected Query))) :+: C1 ('MetaCons "PositionalBoundsCteBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (Ref SExp))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Selected Query)))) |
data WithClauses #
CTE expression support- the RECURSIVE keyword allows any subsequently mentioned CTEs to be recursive (but are not necessarily recursive).
Constructors
WithClauses | |
Fields |
Instances
Data WithClauses # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WithClauses -> c WithClauses # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WithClauses # toConstr :: WithClauses -> Constr # dataTypeOf :: WithClauses -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WithClauses) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WithClauses) # gmapT :: (forall b. Data b => b -> b) -> WithClauses -> WithClauses # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WithClauses -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WithClauses -> r # gmapQ :: (forall d. Data d => d -> u) -> WithClauses -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WithClauses -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WithClauses -> m WithClauses # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WithClauses -> m WithClauses # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WithClauses -> m WithClauses # | |||||
Generic WithClauses # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show WithClauses # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> WithClauses -> ShowS # show :: WithClauses -> String # showList :: [WithClauses] -> ShowS # | |||||
Default WithClauses # | |||||
Defined in Napkin.Types.Core Methods def :: WithClauses # | |||||
NFData WithClauses # | |||||
Defined in Napkin.Types.Core Methods rnf :: WithClauses -> () # | |||||
Eq WithClauses # | |||||
Defined in Napkin.Types.Core | |||||
Ord WithClauses # | |||||
Defined in Napkin.Types.Core Methods compare :: WithClauses -> WithClauses -> Ordering # (<) :: WithClauses -> WithClauses -> Bool # (<=) :: WithClauses -> WithClauses -> Bool # (>) :: WithClauses -> WithClauses -> Bool # (>=) :: WithClauses -> WithClauses -> Bool # max :: WithClauses -> WithClauses -> WithClauses # min :: WithClauses -> WithClauses -> WithClauses # | |||||
HasDeps WithClauses # | |||||
Defined in Napkin.Types.Deps Methods dependenciesSet :: WithClauses -> Set (Ref Table) # | |||||
FunRenamer WithClauses # | |||||
Defined in Napkin.Types.QueryTransformer Methods renameFun :: (Ref Function -> Ref Function) -> WithClauses -> WithClauses # | |||||
FunctionTransformer WithClauses # | |||||
Defined in Napkin.Types.QueryTransformer Methods modFun :: (ExternFun -> SExp) -> WithClauses -> WithClauses # | |||||
TableRenamer WithClauses # | |||||
Defined in Napkin.Types.QueryTransformer Methods renameTableRef :: (Ref Table -> Ref Table) -> WithClauses -> WithClauses # | |||||
Lift WithClauses # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => WithClauses -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => WithClauses -> Code m WithClauses # | |||||
type Rep WithClauses # | |||||
Defined in Napkin.Types.Core type Rep WithClauses = D1 ('MetaData "WithClauses" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "WithClauses" 'PrefixI 'True) (S1 ('MetaSel ('Just "_withClauses_recursive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_withClauses_cteBodies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OMap (Ref Query) CteBody)))) |
orderWithInserted :: WithClauses -> [(Ref Query, CteBody)] #
cteRefs :: forall {k} (a :: k). WithClauses -> Set (Ref a) #
Constructors
AsStruct | |
AsStructNo | |
AsValue |
Instances
Data AsStruct # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AsStruct -> c AsStruct # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AsStruct # toConstr :: AsStruct -> Constr # dataTypeOf :: AsStruct -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AsStruct) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AsStruct) # gmapT :: (forall b. Data b => b -> b) -> AsStruct -> AsStruct # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AsStruct -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AsStruct -> r # gmapQ :: (forall d. Data d => d -> u) -> AsStruct -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AsStruct -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct # | |||||
Generic AsStruct # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Read AsStruct # | |||||
Show AsStruct # | |||||
NFData AsStruct # | |||||
Defined in Napkin.Types.Core | |||||
Eq AsStruct # | |||||
Ord AsStruct # | |||||
Defined in Napkin.Types.Core | |||||
Lift AsStruct # | |||||
type Rep AsStruct # | |||||
Defined in Napkin.Types.Core type Rep AsStruct = D1 ('MetaData "AsStruct" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "AsStruct" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AsStructNo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AsValue" 'PrefixI 'False) (U1 :: Type -> Type))) |
data ParensOperatorArgument #
Constructors
ParensOperatorArgument [Keyword] (Alias SExp) | |
ParensOperatorConst [Keyword] |
Instances
Data ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParensOperatorArgument -> c ParensOperatorArgument # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParensOperatorArgument # toConstr :: ParensOperatorArgument -> Constr # dataTypeOf :: ParensOperatorArgument -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParensOperatorArgument) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParensOperatorArgument) # gmapT :: (forall b. Data b => b -> b) -> ParensOperatorArgument -> ParensOperatorArgument # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParensOperatorArgument -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParensOperatorArgument -> r # gmapQ :: (forall d. Data d => d -> u) -> ParensOperatorArgument -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParensOperatorArgument -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParensOperatorArgument -> m ParensOperatorArgument # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParensOperatorArgument -> m ParensOperatorArgument # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParensOperatorArgument -> m ParensOperatorArgument # | |||||
Generic ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Associated Types
Methods from :: ParensOperatorArgument -> Rep ParensOperatorArgument x # to :: Rep ParensOperatorArgument x -> ParensOperatorArgument # | |||||
Show ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> ParensOperatorArgument -> ShowS # show :: ParensOperatorArgument -> String # showList :: [ParensOperatorArgument] -> ShowS # | |||||
NFData ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods rnf :: ParensOperatorArgument -> () # | |||||
Eq ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods (==) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # (/=) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # | |||||
Ord ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods compare :: ParensOperatorArgument -> ParensOperatorArgument -> Ordering # (<) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # (<=) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # (>) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # (>=) :: ParensOperatorArgument -> ParensOperatorArgument -> Bool # max :: ParensOperatorArgument -> ParensOperatorArgument -> ParensOperatorArgument # min :: ParensOperatorArgument -> ParensOperatorArgument -> ParensOperatorArgument # | |||||
Lift ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => ParensOperatorArgument -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ParensOperatorArgument -> Code m ParensOperatorArgument # | |||||
type Rep ParensOperatorArgument # | |||||
Defined in Napkin.Types.Core type Rep ParensOperatorArgument = D1 ('MetaData "ParensOperatorArgument" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "ParensOperatorArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Keyword]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Alias SExp))) :+: C1 ('MetaCons "ParensOperatorConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Keyword]))) |
data ParensOperator #
Constructors
ParensOperator [Ref Function] [ParensOperatorArgument] | |
ParensLessOperator [Ref Function] |
Instances
Data ParensOperator # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParensOperator -> c ParensOperator # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParensOperator # toConstr :: ParensOperator -> Constr # dataTypeOf :: ParensOperator -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParensOperator) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParensOperator) # gmapT :: (forall b. Data b => b -> b) -> ParensOperator -> ParensOperator # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParensOperator -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParensOperator -> r # gmapQ :: (forall d. Data d => d -> u) -> ParensOperator -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParensOperator -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParensOperator -> m ParensOperator # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParensOperator -> m ParensOperator # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParensOperator -> m ParensOperator # | |||||
Generic ParensOperator # | |||||
Defined in Napkin.Types.Core Associated Types
Methods from :: ParensOperator -> Rep ParensOperator x # to :: Rep ParensOperator x -> ParensOperator # | |||||
Show ParensOperator # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> ParensOperator -> ShowS # show :: ParensOperator -> String # showList :: [ParensOperator] -> ShowS # | |||||
NFData ParensOperator # | |||||
Defined in Napkin.Types.Core Methods rnf :: ParensOperator -> () # | |||||
Eq ParensOperator # | |||||
Defined in Napkin.Types.Core Methods (==) :: ParensOperator -> ParensOperator -> Bool # (/=) :: ParensOperator -> ParensOperator -> Bool # | |||||
Ord ParensOperator # | |||||
Defined in Napkin.Types.Core Methods compare :: ParensOperator -> ParensOperator -> Ordering # (<) :: ParensOperator -> ParensOperator -> Bool # (<=) :: ParensOperator -> ParensOperator -> Bool # (>) :: ParensOperator -> ParensOperator -> Bool # (>=) :: ParensOperator -> ParensOperator -> Bool # max :: ParensOperator -> ParensOperator -> ParensOperator # min :: ParensOperator -> ParensOperator -> ParensOperator # | |||||
Lift ParensOperator # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => ParensOperator -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ParensOperator -> Code m ParensOperator # | |||||
type Rep ParensOperator # | |||||
Defined in Napkin.Types.Core type Rep ParensOperator = D1 ('MetaData "ParensOperator" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "ParensOperator" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ref Function]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ParensOperatorArgument])) :+: C1 ('MetaCons "ParensLessOperator" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ref Function]))) |
type ColumnComment = (Ref SExp, Text) #
Constructors
Query | |
Fields
| |
Union | |
Fields
| |
QueryRaw RawQuery | Escape hatch: A raw query with all the dependencies contained therein. Avoid if possible. |
NativeQuery NativeQuery |
Instances
Data Query # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Query -> c Query # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Query # dataTypeOf :: Query -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Query) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Query) # gmapT :: (forall b. Data b => b -> b) -> Query -> Query # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Query -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Query -> r # gmapQ :: (forall d. Data d => d -> u) -> Query -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Query -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Query -> m Query # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Query -> m Query # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Query -> m Query # | |||||
Generic Query # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show Query # | |||||
NFData Query # | |||||
Defined in Napkin.Types.Core | |||||
Eq Query # | |||||
Ord Query # | |||||
AsRelation Query # | |||||
Defined in Napkin.Types.Core Methods asRelation :: Query -> Relation # | |||||
HasDefinition Query # | |||||
MaybeQuery Query # | |||||
HasDeps Query # | |||||
Defined in Napkin.Types.Deps | |||||
FunRenamer Query # | |||||
FunctionTransformer Query # | |||||
TableRenamer Query # | |||||
Defined in Napkin.Types.QueryTransformer | |||||
RenderSql Query BigQuery # | |||||
RenderSql Query MsSql # | |||||
RenderSql Query Postgres # | |||||
RenderSql Query Redshift # | |||||
RenderSql Query Sqlite # | |||||
Lift Query # | |||||
FunRenamer (Selected Query) # | |||||
FunctionTransformer (Selected Query) # | |||||
TableRenamer (Selected Query) # | |||||
type Rep Query # | |||||
Defined in Napkin.Types.Core type Rep Query = D1 ('MetaData "Query" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) ((C1 ('MetaCons "Query" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_queryWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WithClauses) :*: (S1 ('MetaSel ('Just "_querySelect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Alias SExp]) :*: S1 ('MetaSel ('Just "_queryComments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ColumnComment]))) :*: (S1 ('MetaSel ('Just "_queryFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe From)) :*: (S1 ('MetaSel ('Just "_queryTableOperator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ParensOperator)) :*: S1 ('MetaSel ('Just "_queryWhere") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SExp))))) :*: ((S1 ('MetaSel ('Just "_queryHaving") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SExp)) :*: (S1 ('MetaSel ('Just "_queryGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GroupBy) :*: S1 ('MetaSel ('Just "_queryOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Order))) :*: ((S1 ('MetaSel ('Just "_queryLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "_queryOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "_queryDistinct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Distinctness) :*: S1 ('MetaSel ('Just "_queryAs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AsStruct))))) :+: C1 ('MetaCons "Union" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_unionType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnionType) :*: S1 ('MetaSel ('Just "_unionQuery1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Query)) :*: (S1 ('MetaSel ('Just "_unionQuery2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Query) :*: S1 ('MetaSel ('Just "_unionWiths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WithClauses)))) :+: (C1 ('MetaCons "QueryRaw" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RawQuery)) :+: C1 ('MetaCons "NativeQuery" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NativeQuery)))) |
data NativeQuery #
Instances
Data NativeQuery # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NativeQuery -> c NativeQuery # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NativeQuery # toConstr :: NativeQuery -> Constr # dataTypeOf :: NativeQuery -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NativeQuery) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NativeQuery) # gmapT :: (forall b. Data b => b -> b) -> NativeQuery -> NativeQuery # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NativeQuery -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NativeQuery -> r # gmapQ :: (forall d. Data d => d -> u) -> NativeQuery -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NativeQuery -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NativeQuery -> m NativeQuery # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NativeQuery -> m NativeQuery # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NativeQuery -> m NativeQuery # | |||||
Generic NativeQuery # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show NativeQuery # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> NativeQuery -> ShowS # show :: NativeQuery -> String # showList :: [NativeQuery] -> ShowS # | |||||
NFData NativeQuery # | |||||
Defined in Napkin.Types.Core Methods rnf :: NativeQuery -> () # | |||||
Eq NativeQuery # | |||||
Defined in Napkin.Types.Core | |||||
Ord NativeQuery # | |||||
Defined in Napkin.Types.Core Methods compare :: NativeQuery -> NativeQuery -> Ordering # (<) :: NativeQuery -> NativeQuery -> Bool # (<=) :: NativeQuery -> NativeQuery -> Bool # (>) :: NativeQuery -> NativeQuery -> Bool # (>=) :: NativeQuery -> NativeQuery -> Bool # max :: NativeQuery -> NativeQuery -> NativeQuery # min :: NativeQuery -> NativeQuery -> NativeQuery # | |||||
ToDbBackend anyBackend => RenderSql NativeQuery anyBackend # | |||||
Defined in Napkin.Render.Native Methods renderSql :: anyBackend -> NativeQuery -> ME Doc # | |||||
Lift NativeQuery # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => NativeQuery -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => NativeQuery -> Code m NativeQuery # | |||||
type Rep NativeQuery # | |||||
Defined in Napkin.Types.Core type Rep NativeQuery = D1 ('MetaData "NativeQuery" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "PostgresSelectStmt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SelectStmt)) :+: C1 ('MetaCons "SimpleSQLParserQueryExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QueryExpr))) |
emptyQuery :: Query #
mkUnion :: UnionType -> [Query] -> Query #
Convenience: Combine list of queries via union of the same type
collectUnionQueries :: Query -> NonEmpty Query #
Pull apart any UNIONs and extract a flat list of non-union queries.
data DefinedRelation #
OO-style wrapper for objects that contain a full query definition
Constructors
(AsRelation s, HasDefinition s, MaybeQuery s) => DefinedRelation s |
Instances
AsRelation DefinedRelation # | |
Defined in Napkin.Types.Core Methods asRelation :: DefinedRelation -> Relation # |
data DefinedQuery #
Like DefinedRelation
, but only requires a defined query.
Constructors
HasDefinition s => DefinedQuery s |
class AsRelation s where #
Methods
asRelation :: s -> Relation #
Instances
AsRelation DefinedRelation # | |
Defined in Napkin.Types.Core Methods asRelation :: DefinedRelation -> Relation # | |
AsRelation Query # | |
Defined in Napkin.Types.Core Methods asRelation :: Query -> Relation # | |
AsRelation Relation # | |
Defined in Napkin.Types.Core Methods asRelation :: Relation -> Relation # | |
AsRelation SpecTableName # | |
Defined in Napkin.Types.Core Methods asRelation :: SpecTableName -> Relation # | |
AsRelation (CreateTableAs m) # | |
Defined in Napkin.Spec.Types.CreateTableAs Methods asRelation :: CreateTableAs m -> Relation # | |
AsRelation (CreateTable m) # | |
Defined in Napkin.Types.Commands Methods asRelation :: CreateTable m -> Relation # | |
AsRelation (CreateView meta) # | |
Defined in Napkin.Types.Commands Methods asRelation :: CreateView meta -> Relation # | |
AsRelation (Q a) # | |
Defined in Napkin.Untyped.Monad Methods asRelation :: Q a -> Relation # | |
AsRelation (Ref a) # | |
Defined in Napkin.Types.Core Methods asRelation :: Ref a -> Relation # |
class HasDefinition s where #
Instances
HasDefinition Query # | |
HasDefinition (CreateTableAs m) # | |
Defined in Napkin.Spec.Types.CreateTableAs Methods defQuery :: Lens (CreateTableAs m) (CreateTableAs m) Query Query # | |
HasDefinition (CreateTable m) # | |
Defined in Napkin.Types.Commands Methods defQuery :: Lens (CreateTable m) (CreateTable m) Query Query # | |
HasDefinition (Q ()) # | |
class MaybeQuery s where #
Things that may or may not contain an explicit Query inside
Instances
MaybeQuery Query # | |
MaybeQuery Relation # | |
MaybeQuery (CreateTableAs m) # | |
Defined in Napkin.Spec.Types.CreateTableAs Methods getQuery :: CreateTableAs m -> Maybe Query # | |
MaybeQuery (CreateTable m) # | |
Defined in Napkin.Types.Commands Methods getQuery :: CreateTable m -> Maybe Query # | |
MaybeQuery (Q ()) # | |
queryFullySpecified :: Data a => a -> Bool #
Has select *
been used anywhere inside this thing? If so, False.
queryHaving :: Traversal' Query (Maybe SExp) #
queryLimit :: Traversal' Query (Maybe Int) #
queryOffset :: Traversal' Query (Maybe Int) #
querySelect :: Traversal' Query [Alias SExp] #
queryWhere :: Traversal' Query (Maybe SExp) #
_Query :: Prism' Query (WithClauses, [Alias SExp], [ColumnComment], Maybe From, Maybe ParensOperator, Maybe SExp, Maybe SExp, GroupBy, Order, Maybe Int, Maybe Int, Distinctness, AsStruct) #
_From :: Iso' From (Selected Relation, [(Selected Relation, JoinType, Either (Maybe SExp) [Ref SExp])]) #
_JoinRight :: Prism' JoinType () #
_JoinInner :: Prism' JoinType () #
_JoinCross :: Prism' JoinType () #
_JoinOuter :: Prism' JoinType () #
unRef :: forall k1 (a1 :: k1) k2 (a2 :: k2) p f. (Profunctor p, Functor f) => p (NonEmpty Name) (f (NonEmpty Name)) -> p (Ref a1) (f (Ref a2)) #
_Millennium :: Prism' DatePart () #
_DayOfWeek :: Prism' DatePart () #
_DayOfYear :: Prism' DatePart () #
_Millisecond :: Prism' DatePart () #
_Microsecond :: Prism' DatePart () #
_ArraySelect :: Prism' SExp Query #
_ArrayItem :: Prism' SExp (ArrayBase, Nullability, SExp, SExp) #
_FieldAccess :: Prism' SExp (SExp, StructField) #
selectItem :: forall a f. Functor f => (a -> f a) -> Selected a -> f (Selected a) #
aliasRef :: forall a f. Functor f => (Maybe (Ref a) -> f (Maybe (Ref a))) -> Alias a -> f (Alias a) #
_WithClauses :: Iso' WithClauses (Bool, OMap (Ref Query) CteBody) #
refNamespace :: forall {k} (a :: k) f. Functor f => (Maybe Name -> f (Maybe Name)) -> Ref a -> f (Ref a) #
Instances
Val Int64 # | Auto-convert from |
Val ByteString # | |
Defined in Napkin.Types.Core Methods val :: Prism' Value ByteString # | |
Val DatePart # | |
Val IntInterval # | |
Defined in Napkin.Types.Core Methods val :: Prism' Value IntInterval # | |
Val Value # | |
Val Text # | |
Val Day # | |
Val UTCTime # | |
Val String # | |
Val Integer # | |
Val Bool # | |
Val Double # | |
Val Int # | |
Val a => Val (Maybe a) # | |
interval :: [(Double, DatePart)] -> SExp #
Shorthand for using literal Doubles in making interval expressions.
Monomorphic converter to make it easy to type string literals under OverloadedStrings
fullWindow :: WOver #
Convenient starting point for full window (unbounded) for cases where not specifying window defaults to a partial window. (E.g. BigQuery)
Instances
TableRef DeleteFrom # | |
Defined in Napkin.Types.Commands | |
TableRef DropView # | |
TableRef InsertIntoQuery # | |
Defined in Napkin.Types.Commands | |
TableRef SpecTableName # | |
Defined in Napkin.Types.Core | |
TableRef (CreateTableAs m) # | |
Defined in Napkin.Spec.Types.CreateTableAs | |
TableRef (CreateTable m) # | |
Defined in Napkin.Types.Commands | |
TableRef (CreateView meta) # | |
Defined in Napkin.Types.Commands | |
TableRef (Ref Table) # | |
relationRef :: TableRef a => Getter a Relation #
varAs :: forall {k} (a :: k). Ref a -> Selected SExp #
Polymorphic to support refs that come out of Relations, etc.
asSelf :: SExp -> Selected SExp #
"Note that this is a partial function and will work only for SExps that are Var's. Please prefer varAs or as
when possible
funAs :: (SExp -> b) -> Ref b -> Selected b #
Apply function to a Ref and select it by the same name as the ref. Common use case in SELECT queries.
selectToRef :: Selected SExp -> SExp #
Use the name of a Selected
as a reference. Typically when
you've computed a field in a subquery or a previous table, and
you're now using that computation directly via its name.
selectedExps :: forall a f. Applicative f => (a -> f a) -> [Selected a] -> f [Selected a] #
selectedNames :: forall a0 f. Applicative f => (String -> f String) -> [Selected a0] -> f [Selected a0] #
refName :: forall {k1} {k2} (a :: k1) (a1 :: k2) f. Applicative f => (String -> f String) -> Ref a -> f (Ref a1) #
Pull the last name out of a Ref. E.g. if Ref contains a schema.table_name, pull just the table_name out.
refLitName :: forall {k1} {k2} (a :: k1) (a1 :: k2) f. Applicative f => (SrcLitStr -> f SrcLitStr) -> Ref a -> f (Ref a1) #
Pull the last name out of a Ref e.g. if Ref "schema"."table_name"
,
pull just "table_name"
. String type preserves quotation/encoding
even after prepending/appending a string to it or modification through regex.
refRoot :: forall {k} (a :: k) f. Functor f => (Name -> f Name) -> Ref a -> f (Ref a) #
Get final segments on the ref path and grab the name
refJustRoot :: forall {k} (a :: k). Ref a -> Ref a #
selectedName :: forall a f. Applicative f => (Name -> f Name) -> Selected a -> f (Selected a) #
aliasedNames :: HasDefinition s => Traversal' s (Ref SExp) #
viewAliasedNames :: (MaybeQuery s, Applicative f, Contravariant f) => (Ref SExp -> f (Ref SExp)) -> s -> f s #
scopeRefs :: forall {k} b (t :: k). Data b => Ref t -> b -> b #
Attach all column references within expression to given (table) reference. Note this would replace both their use as variables and in naming the aliases.
scopeExps :: forall {k} b (t :: k). Data b => Ref t -> b -> b #
Modify all variable references in the given object to use the given reference as the hierarchical source of the variable. Useful when pointing all variables to belong to a given relationtablename in a context.
modifyExterns :: Data b => (ExternFun -> SExp) -> b -> b #
Constructors
Unit | Expression is at the row level |
Agg | Aggregate functions, like |
Analytic | Analytic level (some backends) |
Instances
Data AggLevel # | |
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AggLevel -> c AggLevel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AggLevel # toConstr :: AggLevel -> Constr # dataTypeOf :: AggLevel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AggLevel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AggLevel) # gmapT :: (forall b. Data b => b -> b) -> AggLevel -> AggLevel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AggLevel -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AggLevel -> r # gmapQ :: (forall d. Data d => d -> u) -> AggLevel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AggLevel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AggLevel -> m AggLevel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AggLevel -> m AggLevel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AggLevel -> m AggLevel # | |
Show AggLevel # | |
Eq AggLevel # | |
Ord AggLevel # | |
Defined in Napkin.Types.Core |
data UpdateQuery #
Constructors
UpdateQuery | |
Fields |
Instances
Data UpdateQuery # | |||||
Defined in Napkin.Types.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateQuery -> c UpdateQuery # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateQuery # toConstr :: UpdateQuery -> Constr # dataTypeOf :: UpdateQuery -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UpdateQuery) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateQuery) # gmapT :: (forall b. Data b => b -> b) -> UpdateQuery -> UpdateQuery # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateQuery -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateQuery -> r # gmapQ :: (forall d. Data d => d -> u) -> UpdateQuery -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateQuery -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateQuery -> m UpdateQuery # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateQuery -> m UpdateQuery # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateQuery -> m UpdateQuery # | |||||
Generic UpdateQuery # | |||||
Defined in Napkin.Types.Core Associated Types
| |||||
Show UpdateQuery # | |||||
Defined in Napkin.Types.Core Methods showsPrec :: Int -> UpdateQuery -> ShowS # show :: UpdateQuery -> String # showList :: [UpdateQuery] -> ShowS # | |||||
NFData UpdateQuery # | |||||
Defined in Napkin.Types.Core Methods rnf :: UpdateQuery -> () # | |||||
Eq UpdateQuery # | |||||
Defined in Napkin.Types.Core | |||||
Ord UpdateQuery # | |||||
Defined in Napkin.Types.Core Methods compare :: UpdateQuery -> UpdateQuery -> Ordering # (<) :: UpdateQuery -> UpdateQuery -> Bool # (<=) :: UpdateQuery -> UpdateQuery -> Bool # (>) :: UpdateQuery -> UpdateQuery -> Bool # (>=) :: UpdateQuery -> UpdateQuery -> Bool # max :: UpdateQuery -> UpdateQuery -> UpdateQuery # min :: UpdateQuery -> UpdateQuery -> UpdateQuery # | |||||
HasDeps UpdateQuery # | |||||
Defined in Napkin.Types.Deps Methods dependenciesSet :: UpdateQuery -> Set (Ref Table) # | |||||
(RenderSql SExp b, RenderSql Name b, RenderSql From b, RenderSql (Alias (Ref Table)) b) => RenderSql UpdateQuery b # | |||||
Defined in Napkin.Render.Common Methods renderSql :: b -> UpdateQuery -> ME Doc # | |||||
Lift UpdateQuery # | |||||
Defined in Napkin.Types.Core Methods lift :: Quote m => UpdateQuery -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => UpdateQuery -> Code m UpdateQuery # | |||||
Command UpdateQuery () BigQuery # | |||||
Defined in Napkin.Run.BigQuery Methods execCommand :: MonadNapkin BigQuery m => BackendConn BigQuery -> UpdateQuery -> m () # | |||||
Command UpdateQuery () MsSql # | |||||
Defined in Napkin.Run.MsSql Methods execCommand :: MonadNapkin MsSql m => BackendConn MsSql -> UpdateQuery -> m () # | |||||
Command UpdateQuery () Postgres # | |||||
Defined in Napkin.Run.Postgres Methods execCommand :: MonadNapkin Postgres m => BackendConn Postgres -> UpdateQuery -> m () # | |||||
Command UpdateQuery () Redshift # | |||||
Defined in Napkin.Run.Redshift Methods execCommand :: MonadNapkin Redshift m => BackendConn Redshift -> UpdateQuery -> m () # | |||||
Command UpdateQuery () Sqlite # | |||||
Defined in Napkin.Run.Sqlite Methods execCommand :: MonadNapkin Sqlite m => BackendConn Sqlite -> UpdateQuery -> m () # | |||||
type Rep UpdateQuery # | |||||
Defined in Napkin.Types.Core type Rep UpdateQuery = D1 ('MetaData "UpdateQuery" "Napkin.Types.Core" "napkin-1.0.0-5YkWAC9Wc776PT0LDghaFb" 'False) (C1 ('MetaCons "UpdateQuery" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_updateQueryTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Alias (Ref Table))) :*: S1 ('MetaSel ('Just "_updateQuerySet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OMap Name SExp))) :*: (S1 ('MetaSel ('Just "_updateQueryFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe From)) :*: S1 ('MetaSel ('Just "_updateQueryWhere") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SExp))))) |
updateQuerySet :: Lens' UpdateQuery (OMap Name SExp) #
updateQueryTarget :: Lens' UpdateQuery (Alias (Ref Table)) #
pattern NapkinTablePrefix :: (Eq a, IsString a) => a #
pattern NapkinTableSeparator :: (Eq a, IsString a) => a #
isTemporaryTable :: Ref Table -> Bool #
tmpTableNameFormat :: UTCTime -> Text -> Text #
Temporary tables name format: _np_POSIXtimestamp_token[_tablename], timestamps are used for temporary tables cleanup command
getUTCTimeTemporaryTable :: Ref Table -> Maybe UTCTime #
extracts timestamp from temporary tables name format (tmpTableNameFormat function): _np_day-utc-timestamp_seconds-utc-timestamp_token[_tablename]
getTemporaryTableName :: forall {k} m (b :: k). MonadIO m => m (Ref b) #