napkin-0.5.11
Safe HaskellNone
LanguageHaskell2010

Napkin.Types

Synopsis

Documentation

data Name #

Copyright : (c) Soostone Inc, 2020 License : AllRightsReserved Stability : experimental Portability : POSIX

Constructors

Specific String 
Star 

Instances

Instances details
Eq Name # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Data Name # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: Name -> Constr #

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 #

Ord Name # 
Instance details

Defined in Napkin.Types

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Read Name # 
Instance details

Defined in Napkin.Types

Show Name # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

IsString Name # 
Instance details

Defined in Napkin.Types

Methods

fromString :: String -> Name #

Generic Name # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

NFData Name # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Name -> () #

Hashable Name # 
Instance details

Defined in Napkin.Types

Methods

hashWithSalt :: Int -> Name -> Int #

hash :: Name -> Int #

ToJSON Name # 
Instance details

Defined in Napkin.Types

FromJSON Name # 
Instance details

Defined in Napkin.Types

IsRef Name # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). Name -> Ref b #

Lift Name # 
Instance details

Defined in Napkin.Types

Methods

lift :: Name -> Q Exp #

liftTyped :: Name -> Q (TExp Name) #

Lift (NonEmpty Name) # 
Instance details

Defined in Napkin.Types

IsRef [Name] # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). [Name] -> Ref b #

IsRef (NonEmpty Name) # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). NonEmpty Name -> Ref b #

Cons (Ref a) (Ref a) Name Name # 
Instance details

Defined in Napkin.Types

Methods

_Cons :: Prism (Ref a) (Ref a) (Name, Ref a) (Name, Ref a) #

Snoc (Ref a) (Ref a) Name Name # 
Instance details

Defined in Napkin.Types

Methods

_Snoc :: Prism (Ref a) (Ref a) (Ref a, Name) (Ref a, Name) #

type Rep Name # 
Instance details

Defined in Napkin.Types

type Rep Name = D1 ('MetaData "Name" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (C1 ('MetaCons "Specific" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "Star" 'PrefixI 'False) (U1 :: Type -> Type))

newtype Ref a #

A way to refer to entities like fields, tables, schemas, etc. Namespacing is common so we keep a list here.

Constructors

Ref 

Fields

Instances

Instances details
Lift (Ref a :: Type) # 
Instance details

Defined in Napkin.Types

Methods

lift :: Ref a -> Q Exp #

liftTyped :: Ref a -> Q (TExp (Ref a)) #

BeamSqlBackend bk => HasSqlEqualityCheck bk (Ref a) # 
Instance details

Defined in Napkin.Metadata.Instances

HasSqlValueSyntax bk Text => HasSqlValueSyntax bk (Ref a) # 
Instance details

Defined in Napkin.Metadata.Instances

Methods

sqlValueSyntax :: Ref a -> bk #

(BeamMigrateSqlBackend bk, FromBackendRow bk Text) => FromBackendRow bk (Ref a) # 
Instance details

Defined in Napkin.Metadata.Instances

BeamMigrateSqlBackend bk => HasDefaultSqlDataType bk (Ref a) # 
Instance details

Defined in Napkin.Metadata.Instances

BeamSqlBackend bk => DataTypeForBackend bk (Ref b) # 
Instance details

Defined in Napkin.Metadata.Migrations

Methods

dbType :: DataType bk (Ref b) #

Eq (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Ref a -> Ref a -> Bool #

(/=) :: Ref a -> Ref a -> Bool #

(Typeable a, Typeable k) => Data (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ref a -> c (Ref a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ref a) #

toConstr :: Ref a -> Constr #

dataTypeOf :: Ref a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ref a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ref a)) #

gmapT :: (forall b. Data b => b -> b) -> Ref a -> Ref a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ref a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ref a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ref a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ref a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ref a -> m (Ref a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ref a -> m (Ref a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ref a -> m (Ref a) #

Ord (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

compare :: Ref a -> Ref a -> Ordering #

(<) :: Ref a -> Ref a -> Bool #

(<=) :: Ref a -> Ref a -> Bool #

(>) :: Ref a -> Ref a -> Bool #

(>=) :: Ref a -> Ref a -> Bool #

max :: Ref a -> Ref a -> Ref a #

min :: Ref a -> Ref a -> Ref a #

Read (Ref a) # 
Instance details

Defined in Napkin.Types

Show (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Ref a -> ShowS #

show :: Ref a -> String #

showList :: [Ref a] -> ShowS #

IsString (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

fromString :: String -> Ref a #

Generic (Ref a) # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep (Ref a) :: Type -> Type #

Methods

from :: Ref a -> Rep (Ref a) x #

to :: Rep (Ref a) x -> Ref a #

Semigroup (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

(<>) :: Ref a -> Ref a -> Ref a #

sconcat :: NonEmpty (Ref a) -> Ref a #

stimes :: Integral b => b -> Ref a -> Ref a #

NFData (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Ref a -> () #

Hashable (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

hashWithSalt :: Int -> Ref a -> Int #

hash :: Ref a -> Int #

ToJSON (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

toJSON :: Ref a -> Value #

toEncoding :: Ref a -> Encoding #

toJSONList :: [Ref a] -> Value #

toEncodingList :: [Ref a] -> Encoding #

ToJSONKey (Ref a) # 
Instance details

Defined in Napkin.Types

FromJSON (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

parseJSON :: Value -> Parser (Ref a) #

parseJSONList :: Value -> Parser [Ref a] #

FromJSONKey (Ref a) # 
Instance details

Defined in Napkin.Types

Buildable (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

build :: Ref a -> Builder #

AsRelation (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

asRelation :: Ref a -> Relation #

IsRef (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). Ref a -> Ref b #

HasDeps (Ref Table) # 
Instance details

Defined in Napkin.Types

TableRef (Ref Table) # 
Instance details

Defined in Napkin.Types

Methods

tableRef :: Lens' (Ref Table) (Ref Table) #

RenderSql (Ref t) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Ref t -> Doc #

RenderSql (Ref t) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Ref t -> Doc #

RenderSql (Ref t) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Ref t -> Doc #

RenderSql (Ref t) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Ref t -> Doc #

Cons (Ref a) (Ref a) Name Name # 
Instance details

Defined in Napkin.Types

Methods

_Cons :: Prism (Ref a) (Ref a) (Name, Ref a) (Name, Ref a) #

Snoc (Ref a) (Ref a) Name Name # 
Instance details

Defined in Napkin.Types

Methods

_Snoc :: Prism (Ref a) (Ref a) (Ref a, Name) (Ref a, Name) #

type Rep (Ref a) # 
Instance details

Defined in Napkin.Types

type Rep (Ref a) = D1 ('MetaData "Ref" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'True) (C1 ('MetaCons "Ref" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Name))))

class IsRef a where #

Class of string-like types that can be interpreted as Refs

Methods

ref :: forall b. a -> Ref b #

Instances

Instances details
IsRef String # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). String -> Ref b #

IsRef Text # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). Text -> Ref b #

IsRef Name # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). Name -> Ref b #

IsRef [Name] # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). [Name] -> Ref b #

IsRef (NonEmpty Name) # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). NonEmpty Name -> Ref b #

IsRef (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

ref :: forall k (b :: k). Ref a -> Ref b #

refComponentCount :: Ref a -> Int #

Return the number of Names in the Ref.

textRef :: Text -> Ref a #

nameRef :: Name -> Ref a #

namesRef :: [Name] -> Ref a #

refText :: Ref t -> Text #

retagRef :: Ref t -> Ref a #

appendRef :: Ref a -> Name -> Ref a #

data Table #

Instances

Instances details
Data Table # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: Table -> Constr #

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 #

HasDeps (Ref Table) # 
Instance details

Defined in Napkin.Types

TableRef (Ref Table) # 
Instance details

Defined in Napkin.Types

Methods

tableRef :: Lens' (Ref Table) (Ref Table) #

data Function #

Instances

Instances details
Data Function # 
Instance details

Defined in Napkin.Types

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 #

data Selected a #

Select something and give it a name; e.g. (my_field as foo)

Constructors

Selected 

Fields

Instances

Instances details
Foldable Selected # 
Instance details

Defined in Napkin.Types

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 #

toList :: Selected a -> [a] #

null :: Selected a -> Bool #

length :: Selected a -> Int #

elem :: Eq a => a -> Selected a -> Bool #

maximum :: Ord a => Selected a -> a #

minimum :: Ord a => Selected a -> a #

sum :: Num a => Selected a -> a #

product :: Num a => Selected a -> a #

WithName Selected # 
Instance details

Defined in Napkin.Types

Methods

as :: b -> Ref b -> Selected b #

Lift a => Lift (Selected a :: Type) # 
Instance details

Defined in Napkin.Types

Methods

lift :: Selected a -> Q Exp #

liftTyped :: Selected a -> Q (TExp (Selected a)) #

Eq a => Eq (Selected a) # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Selected a -> Selected a -> Bool #

(/=) :: Selected a -> Selected a -> Bool #

Data a => Data (Selected a) # 
Instance details

Defined in Napkin.Types

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) #

Ord a => Ord (Selected a) # 
Instance details

Defined in Napkin.Types

Methods

compare :: Selected a -> Selected a -> Ordering #

(<) :: Selected a -> Selected a -> Bool #

(<=) :: Selected a -> Selected a -> Bool #

(>) :: Selected a -> Selected a -> Bool #

(>=) :: Selected a -> Selected a -> Bool #

max :: Selected a -> Selected a -> Selected a #

min :: Selected a -> Selected a -> Selected a #

Show a => Show (Selected a) # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Selected a -> ShowS #

show :: Selected a -> String #

showList :: [Selected a] -> ShowS #

Generic (Selected a) # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep (Selected a) :: Type -> Type #

Methods

from :: Selected a -> Rep (Selected a) x #

to :: Rep (Selected a) x -> Selected a #

NFData a => NFData (Selected a) # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Selected a -> () #

HasDeps a => HasDeps (Selected a) # 
Instance details

Defined in Napkin.Types

type Rep (Selected a) # 
Instance details

Defined in Napkin.Types

type Rep (Selected a) = D1 ('MetaData "Selected" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))

data Alias a #

Like selected, but aliasing is optional

Constructors

Alias 

Fields

Instances

Instances details
Foldable Alias # 
Instance details

Defined in Napkin.Types

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 #

toList :: Alias a -> [a] #

null :: Alias a -> Bool #

length :: Alias a -> Int #

elem :: Eq a => a -> Alias a -> Bool #

maximum :: Ord a => Alias a -> a #

minimum :: Ord a => Alias a -> a #

sum :: Num a => Alias a -> a #

product :: Num a => Alias a -> a #

WithName Alias # 
Instance details

Defined in Napkin.Types

Methods

as :: b -> Ref b -> Alias b #

Lift a => Lift (Alias a :: Type) # 
Instance details

Defined in Napkin.Types

Methods

lift :: Alias a -> Q Exp #

liftTyped :: Alias a -> Q (TExp (Alias a)) #

Eq a => Eq (Alias a) # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Alias a -> Alias a -> Bool #

(/=) :: Alias a -> Alias a -> Bool #

Data a => Data (Alias a) # 
Instance details

Defined in Napkin.Types

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) #

Ord a => Ord (Alias a) # 
Instance details

Defined in Napkin.Types

Methods

compare :: Alias a -> Alias a -> Ordering #

(<) :: Alias a -> Alias a -> Bool #

(<=) :: Alias a -> Alias a -> Bool #

(>) :: Alias a -> Alias a -> Bool #

(>=) :: Alias a -> Alias a -> Bool #

max :: Alias a -> Alias a -> Alias a #

min :: Alias a -> Alias a -> Alias a #

Show a => Show (Alias a) # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Alias a -> ShowS #

show :: Alias a -> String #

showList :: [Alias a] -> ShowS #

Generic (Alias a) # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep (Alias a) :: Type -> Type #

Methods

from :: Alias a -> Rep (Alias a) x #

to :: Rep (Alias a) x -> Alias a #

NFData a => NFData (Alias a) # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Alias a -> () #

RenderSql (Alias SExp) backend => RenderSql [Alias SExp] backend # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: backend -> [Alias SExp] -> Doc #

RenderSql a Sqlite => RenderSql (Alias a) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Alias a -> Doc #

RenderSql a Redshift => RenderSql (Alias a) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Alias a -> Doc #

RenderSql a Postgres => RenderSql (Alias a) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Alias a -> Doc #

RenderSql a BigQuery => RenderSql (Alias a) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Alias a -> Doc #

type Rep (Alias a) # 
Instance details

Defined in Napkin.Types

type Rep (Alias a) = D1 ('MetaData "Alias" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))

nonAlias :: a -> Alias a #

class WithName a where #

Methods

as :: b -> Ref b -> a b #

e.g. var "foo" as "bar"

Instances

Instances details
WithName Alias # 
Instance details

Defined in Napkin.Types

Methods

as :: b -> Ref b -> Alias b #

WithName Selected # 
Instance details

Defined in Napkin.Types

Methods

as :: b -> Ref b -> Selected b #

sa :: WithName a => Ref b -> b -> a b #

Flipped as

data Value #

Instances

Instances details
Eq Value # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Data Value # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: Value -> Constr #

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 #

Ord Value # 
Instance details

Defined in Napkin.Types

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

(>=) :: Value -> Value -> Bool #

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Show Value # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Generic Value # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Value :: Type -> Type #

Methods

from :: Value -> Rep Value x #

to :: Rep Value x -> Value #

NFData Value # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Value -> () #

FromField Value # 
Instance details

Defined in Napkin.Run.Sqlite

Val Value # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Value #

Lift Value # 
Instance details

Defined in Napkin.Types

Methods

lift :: Value -> Q Exp #

liftTyped :: Value -> Q (TExp Value) #

FromField (Named Value) # 
Instance details

Defined in Napkin.Run.PGCommon

FromRow (Map Text Value) # 
Instance details

Defined in Napkin.Run.PGCommon

type Rep Value # 
Instance details

Defined in Napkin.Types

type Rep Value = D1 ('MetaData "Value" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (((C1 ('MetaCons "VDouble" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "VInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) :+: (C1 ('MetaCons "VBool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: (C1 ('MetaCons "VDate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Day)) :+: C1 ('MetaCons "VDateTime" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime))))) :+: ((C1 ('MetaCons "VText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "VBinary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "VInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Interval)))) :+: (C1 ('MetaCons "VNull" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "VDatePart" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DatePart)) :+: C1 ('MetaCons "VArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SExp]))))))

newtype Interval #

Intervals could internally make use of expressions

Constructors

Interval 

Fields

Instances

Instances details
Eq Interval # 
Instance details

Defined in Napkin.Types

Data Interval # 
Instance details

Defined in Napkin.Types

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 #

Ord Interval # 
Instance details

Defined in Napkin.Types

Show Interval # 
Instance details

Defined in Napkin.Types

Generic Interval # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Interval :: Type -> Type #

Methods

from :: Interval -> Rep Interval x #

to :: Rep Interval x -> Interval #

NFData Interval # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Interval -> () #

Lift Interval # 
Instance details

Defined in Napkin.Types

type Rep Interval # 
Instance details

Defined in Napkin.Types

type Rep Interval = D1 ('MetaData "Interval" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'True) (C1 ('MetaCons "Interval" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(SExp, DatePart)])))

data IntInterval #

A simpler sub-variant to Interval that fits certain cases better. Maps onto Interval underneath.

Constructors

IntInterval SExp DatePart 

Instances

Instances details
Eq IntInterval # 
Instance details

Defined in Napkin.Types

Data IntInterval # 
Instance details

Defined in Napkin.Types

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 #

Ord IntInterval # 
Instance details

Defined in Napkin.Types

Show IntInterval # 
Instance details

Defined in Napkin.Types

Val IntInterval # 
Instance details

Defined in Napkin.Types

data SExp #

Constructors

Lit Value 
Var (Ref SExp) 
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 

Instances

Instances details
Eq SExp # 
Instance details

Defined in Napkin.Types

Methods

(==) :: SExp -> SExp -> Bool #

(/=) :: SExp -> SExp -> Bool #

Fractional SExp # 
Instance details

Defined in Napkin.Untyped.Ops

Methods

(/) :: SExp -> SExp -> SExp #

recip :: SExp -> SExp #

fromRational :: Rational -> SExp #

Data SExp # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: SExp -> Constr #

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 #

Num SExp # 
Instance details

Defined in Napkin.Untyped.Ops

Methods

(+) :: SExp -> SExp -> SExp #

(-) :: SExp -> SExp -> SExp #

(*) :: SExp -> SExp -> SExp #

negate :: SExp -> SExp #

abs :: SExp -> SExp #

signum :: SExp -> SExp #

fromInteger :: Integer -> SExp #

Ord SExp # 
Instance details

Defined in Napkin.Types

Methods

compare :: SExp -> SExp -> Ordering #

(<) :: SExp -> SExp -> Bool #

(<=) :: SExp -> SExp -> Bool #

(>) :: SExp -> SExp -> Bool #

(>=) :: SExp -> SExp -> Bool #

max :: SExp -> SExp -> SExp #

min :: SExp -> SExp -> SExp #

Show SExp # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> SExp -> ShowS #

show :: SExp -> String #

showList :: [SExp] -> ShowS #

Generic SExp # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep SExp :: Type -> Type #

Methods

from :: SExp -> Rep SExp x #

to :: Rep SExp x -> SExp #

NFData SExp # 
Instance details

Defined in Napkin.Types

Methods

rnf :: SExp -> () #

HasDeps SExp # 
Instance details

Defined in Napkin.Types

Lift SExp # 
Instance details

Defined in Napkin.Types

Methods

lift :: SExp -> Q Exp #

liftTyped :: SExp -> Q (TExp SExp) #

RenderSql SExp Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> SExp -> Doc #

RenderSql SExp Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SExp -> Doc #

RenderSql SExp Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> SExp -> Doc #

RenderSql SExp BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> SExp -> Doc #

Val [SExp] # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value [SExp] #

RenderSql (Alias SExp) backend => RenderSql [Alias SExp] backend # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: backend -> [Alias SExp] -> Doc #

(ReifiesBackend b, ParseSQL b) => FromJSON (WithBackend b SExp) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Backends

type Rep SExp # 
Instance details

Defined in Napkin.Types

var :: Ref a -> SExp #

data NullStrategy #

Constructors

IgnoreNulls 
RespectNulls 

Instances

Instances details
Eq NullStrategy # 
Instance details

Defined in Napkin.Types

Data NullStrategy # 
Instance details

Defined in Napkin.Types

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 #

Ord NullStrategy # 
Instance details

Defined in Napkin.Types

Show NullStrategy # 
Instance details

Defined in Napkin.Types

Generic NullStrategy # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep NullStrategy :: Type -> Type #

NFData NullStrategy # 
Instance details

Defined in Napkin.Types

Methods

rnf :: NullStrategy -> () #

Lift NullStrategy # 
Instance details

Defined in Napkin.Types

type Rep NullStrategy # 
Instance details

Defined in Napkin.Types

type Rep NullStrategy = D1 ('MetaData "NullStrategy" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (C1 ('MetaCons "IgnoreNulls" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RespectNulls" 'PrefixI 'False) (U1 :: Type -> Type))

data Distinctness #

Constructors

Distinct 
NonDistinct 

Instances

Instances details
Eq Distinctness # 
Instance details

Defined in Napkin.Types

Data Distinctness # 
Instance details

Defined in Napkin.Types

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 #

Ord Distinctness # 
Instance details

Defined in Napkin.Types

Show Distinctness # 
Instance details

Defined in Napkin.Types

Generic Distinctness # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Distinctness :: Type -> Type #

NFData Distinctness # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Distinctness -> () #

Default Distinctness # 
Instance details

Defined in Napkin.Types

Methods

def :: Distinctness #

Lift Distinctness # 
Instance details

Defined in Napkin.Types

type Rep Distinctness # 
Instance details

Defined in Napkin.Types

type Rep Distinctness = D1 ('MetaData "Distinctness" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (C1 ('MetaCons "Distinct" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonDistinct" 'PrefixI 'False) (U1 :: Type -> Type))

type Partition = [SExp] #

data WOver #

Instances

Instances details
Eq WOver # 
Instance details

Defined in Napkin.Types

Methods

(==) :: WOver -> WOver -> Bool #

(/=) :: WOver -> WOver -> Bool #

Data WOver # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: WOver -> Constr #

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 #

Ord WOver # 
Instance details

Defined in Napkin.Types

Methods

compare :: WOver -> WOver -> Ordering #

(<) :: WOver -> WOver -> Bool #

(<=) :: WOver -> WOver -> Bool #

(>) :: WOver -> WOver -> Bool #

(>=) :: WOver -> WOver -> Bool #

max :: WOver -> WOver -> WOver #

min :: WOver -> WOver -> WOver #

Show WOver # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> WOver -> ShowS #

show :: WOver -> String #

showList :: [WOver] -> ShowS #

Generic WOver # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep WOver :: Type -> Type #

Methods

from :: WOver -> Rep WOver x #

to :: Rep WOver x -> WOver #

NFData WOver # 
Instance details

Defined in Napkin.Types

Methods

rnf :: WOver -> () #

Default WOver # 
Instance details

Defined in Napkin.Types

Methods

def :: WOver #

Lift WOver # 
Instance details

Defined in Napkin.Types

Methods

lift :: WOver -> Q Exp #

liftTyped :: WOver -> Q (TExp WOver) #

type Rep WOver # 
Instance details

Defined in Napkin.Types

type Rep WOver = D1 ('MetaData "WOver" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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 WindowFun #

Instances

Instances details
Eq WindowFun # 
Instance details

Defined in Napkin.Types

Data WindowFun # 
Instance details

Defined in Napkin.Types

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 #

Ord WindowFun # 
Instance details

Defined in Napkin.Types

Show WindowFun # 
Instance details

Defined in Napkin.Types

Generic WindowFun # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep WindowFun :: Type -> Type #

NFData WindowFun # 
Instance details

Defined in Napkin.Types

Methods

rnf :: WindowFun -> () #

Lift WindowFun # 
Instance details

Defined in Napkin.Types

type Rep WindowFun # 
Instance details

Defined in Napkin.Types

data WindowFrame #

Instances

Instances details
Eq WindowFrame # 
Instance details

Defined in Napkin.Types

Data WindowFrame # 
Instance details

Defined in Napkin.Types

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 #

Ord WindowFrame # 
Instance details

Defined in Napkin.Types

Show WindowFrame # 
Instance details

Defined in Napkin.Types

Generic WindowFrame # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep WindowFrame :: Type -> Type #

NFData WindowFrame # 
Instance details

Defined in Napkin.Types

Methods

rnf :: WindowFrame -> () #

Lift WindowFrame # 
Instance details

Defined in Napkin.Types

type Rep WindowFrame # 
Instance details

Defined in Napkin.Types

data FrameLength #

Instances

Instances details
Eq FrameLength # 
Instance details

Defined in Napkin.Types

Data FrameLength # 
Instance details

Defined in Napkin.Types

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 #

Ord FrameLength # 
Instance details

Defined in Napkin.Types

Show FrameLength # 
Instance details

Defined in Napkin.Types

Generic FrameLength # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep FrameLength :: Type -> Type #

NFData FrameLength # 
Instance details

Defined in Napkin.Types

Methods

rnf :: FrameLength -> () #

Lift FrameLength # 
Instance details

Defined in Napkin.Types

type Rep FrameLength # 
Instance details

Defined in Napkin.Types

type Rep FrameLength = D1 ('MetaData "FrameLength" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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 Int)) :+: C1 ('MetaCons "LimitedFollowing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

data FunModifier #

Instances

Instances details
Eq FunModifier # 
Instance details

Defined in Napkin.Types

Data FunModifier # 
Instance details

Defined in Napkin.Types

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 #

Ord FunModifier # 
Instance details

Defined in Napkin.Types

Show FunModifier # 
Instance details

Defined in Napkin.Types

Generic FunModifier # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep FunModifier :: Type -> Type #

NFData FunModifier # 
Instance details

Defined in Napkin.Types

Methods

rnf :: FunModifier -> () #

Lift FunModifier # 
Instance details

Defined in Napkin.Types

type Rep FunModifier # 
Instance details

Defined in Napkin.Types

data ExternFun #

Instances

Instances details
Eq ExternFun # 
Instance details

Defined in Napkin.Types

Data ExternFun # 
Instance details

Defined in Napkin.Types

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 #

Ord ExternFun # 
Instance details

Defined in Napkin.Types

Show ExternFun # 
Instance details

Defined in Napkin.Types

Generic ExternFun # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep ExternFun :: Type -> Type #

NFData ExternFun # 
Instance details

Defined in Napkin.Types

Methods

rnf :: ExternFun -> () #

Lift ExternFun # 
Instance details

Defined in Napkin.Types

type Rep ExternFun # 
Instance details

Defined in Napkin.Types

type Rep ExternFun = D1 ('MetaData "ExternFun" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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 "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)))))

data Type #

Instances

Instances details
Eq Type # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Data Type # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: Type -> Constr #

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 #

Ord Type # 
Instance details

Defined in Napkin.Types

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Generic Type # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

NFData Type # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Type -> () #

Lift Type # 
Instance details

Defined in Napkin.Types

Methods

lift :: Type -> Q Exp #

liftTyped :: Type -> Q (TExp Type) #

type Rep Type # 
Instance details

Defined in Napkin.Types

type Rep Type = D1 ('MetaData "Type" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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 "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)))))

data DatePart #

Instances

Instances details
Eq DatePart # 
Instance details

Defined in Napkin.Types

Data DatePart # 
Instance details

Defined in Napkin.Types

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 #

Ord DatePart # 
Instance details

Defined in Napkin.Types

Show DatePart # 
Instance details

Defined in Napkin.Types

Generic DatePart # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep DatePart :: Type -> Type #

Methods

from :: DatePart -> Rep DatePart x #

to :: Rep DatePart x -> DatePart #

NFData DatePart # 
Instance details

Defined in Napkin.Types

Methods

rnf :: DatePart -> () #

Val DatePart # 
Instance details

Defined in Napkin.Types

Lift DatePart # 
Instance details

Defined in Napkin.Types

type Rep DatePart # 
Instance details

Defined in Napkin.Types

type Rep DatePart = D1 ('MetaData "DatePart" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))))

type Order = [OrderPart] #

type GroupBy = [SExp] #

data OrderDir #

Constructors

Asc 
Desc 

Instances

Instances details
Eq OrderDir # 
Instance details

Defined in Napkin.Types

Data OrderDir # 
Instance details

Defined in Napkin.Types

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 #

Ord OrderDir # 
Instance details

Defined in Napkin.Types

Show OrderDir # 
Instance details

Defined in Napkin.Types

Generic OrderDir # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep OrderDir :: Type -> Type #

Methods

from :: OrderDir -> Rep OrderDir x #

to :: Rep OrderDir x -> OrderDir #

NFData OrderDir # 
Instance details

Defined in Napkin.Types

Methods

rnf :: OrderDir -> () #

Lift OrderDir # 
Instance details

Defined in Napkin.Types

type Rep OrderDir # 
Instance details

Defined in Napkin.Types

type Rep OrderDir = D1 ('MetaData "OrderDir" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (C1 ('MetaCons "Asc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Desc" 'PrefixI 'False) (U1 :: Type -> Type))

invertOrder :: OrderDir -> OrderDir #

Flip order

data NullOrder #

Constructors

NullsFirst 
NullsLast 

Instances

Instances details
Eq NullOrder # 
Instance details

Defined in Napkin.Types

Data NullOrder # 
Instance details

Defined in Napkin.Types

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 #

Ord NullOrder # 
Instance details

Defined in Napkin.Types

Show NullOrder # 
Instance details

Defined in Napkin.Types

Generic NullOrder # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep NullOrder :: Type -> Type #

NFData NullOrder # 
Instance details

Defined in Napkin.Types

Methods

rnf :: NullOrder -> () #

Lift NullOrder # 
Instance details

Defined in Napkin.Types

type Rep NullOrder # 
Instance details

Defined in Napkin.Types

type Rep NullOrder = D1 ('MetaData "NullOrder" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" 'False) (C1 ('MetaCons "NullsFirst" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NullsLast" 'PrefixI 'False) (U1 :: Type -> Type))

data OrderPart #

Constructors

OrderPart 

Instances

Instances details
Eq OrderPart # 
Instance details

Defined in Napkin.Types

Data OrderPart # 
Instance details

Defined in Napkin.Types

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 #

Ord OrderPart # 
Instance details

Defined in Napkin.Types

Show OrderPart # 
Instance details

Defined in Napkin.Types

Generic OrderPart # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep OrderPart :: Type -> Type #

NFData OrderPart # 
Instance details

Defined in Napkin.Types

Methods

rnf :: OrderPart -> () #

Lift OrderPart # 
Instance details

Defined in Napkin.Types

type Rep OrderPart # 
Instance details

Defined in Napkin.Types

type Rep OrderPart = D1 ('MetaData "OrderPart" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))))

data Relation #

Constructors

TableRelation (Ref Table) 
QueryRelation Query 
ArrayRelation SExp 
RawRelation [Ref Table] String

Escape hatch: A raw relation with its dependencies. Avoid if possible

Instances

Instances details
Eq Relation # 
Instance details

Defined in Napkin.Types

Data Relation # 
Instance details

Defined in Napkin.Types

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 #

Ord Relation # 
Instance details

Defined in Napkin.Types

Show Relation # 
Instance details

Defined in Napkin.Types

IsString Relation # 
Instance details

Defined in Napkin.Types

Generic Relation # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Relation :: Type -> Type #

Methods

from :: Relation -> Rep Relation x #

to :: Rep Relation x -> Relation #

NFData Relation # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Relation -> () #

MaybeQuery Relation # 
Instance details

Defined in Napkin.Types

AsRelation Relation # 
Instance details

Defined in Napkin.Types

HasDeps Relation # 
Instance details

Defined in Napkin.Types

Lift Relation # 
Instance details

Defined in Napkin.Types

RenderSql Relation Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Relation -> Doc #

RenderSql Relation Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Relation -> Doc #

RenderSql Relation Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Relation -> Doc #

RenderSql Relation BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Relation -> Doc #

type Rep Relation # 
Instance details

Defined in Napkin.Types

table :: Ref a -> Relation #

treat a reference as relation

data JoinType #

Instances

Instances details
Eq JoinType # 
Instance details

Defined in Napkin.Types

Data JoinType # 
Instance details

Defined in Napkin.Types

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 #

Ord JoinType # 
Instance details

Defined in Napkin.Types

Show JoinType # 
Instance details

Defined in Napkin.Types

Generic JoinType # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep JoinType :: Type -> Type #

Methods

from :: JoinType -> Rep JoinType x #

to :: Rep JoinType x -> JoinType #

NFData JoinType # 
Instance details

Defined in Napkin.Types

Methods

rnf :: JoinType -> () #

Lift JoinType # 
Instance details

Defined in Napkin.Types

type Rep JoinType # 
Instance details

Defined in Napkin.Types

type Rep JoinType = D1 ('MetaData "JoinType" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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))))

data From #

Instances

Instances details
Eq From # 
Instance details

Defined in Napkin.Types

Methods

(==) :: From -> From -> Bool #

(/=) :: From -> From -> Bool #

Data From # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: From -> Constr #

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 #

Ord From # 
Instance details

Defined in Napkin.Types

Methods

compare :: From -> From -> Ordering #

(<) :: From -> From -> Bool #

(<=) :: From -> From -> Bool #

(>) :: From -> From -> Bool #

(>=) :: From -> From -> Bool #

max :: From -> From -> From #

min :: From -> From -> From #

Show From # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> From -> ShowS #

show :: From -> String #

showList :: [From] -> ShowS #

Generic From # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep From :: Type -> Type #

Methods

from :: From -> Rep From x #

to :: Rep From x -> From #

NFData From # 
Instance details

Defined in Napkin.Types

Methods

rnf :: From -> () #

HasDeps From # 
Instance details

Defined in Napkin.Types

Lift From # 
Instance details

Defined in Napkin.Types

Methods

lift :: From -> Q Exp #

liftTyped :: From -> Q (TExp From) #

RenderSql From Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> From -> Doc #

RenderSql From Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> From -> Doc #

RenderSql From Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> From -> Doc #

RenderSql From BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> From -> Doc #

type Rep From # 
Instance details

Defined in Napkin.Types

data UnionType #

Instances

Instances details
Eq UnionType # 
Instance details

Defined in Napkin.Types

Data UnionType # 
Instance details

Defined in Napkin.Types

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 #

Ord UnionType # 
Instance details

Defined in Napkin.Types

Show UnionType # 
Instance details

Defined in Napkin.Types

Generic UnionType # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep UnionType :: Type -> Type #

NFData UnionType # 
Instance details

Defined in Napkin.Types

Methods

rnf :: UnionType -> () #

Lift UnionType # 
Instance details

Defined in Napkin.Types

type Rep UnionType # 
Instance details

Defined in Napkin.Types

type Rep UnionType = D1 ('MetaData "UnionType" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))

data RawQuery #

Constructors

RawQuery 

Instances

Instances details
Eq RawQuery # 
Instance details

Defined in Napkin.Types

Data RawQuery # 
Instance details

Defined in Napkin.Types

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 #

Ord RawQuery # 
Instance details

Defined in Napkin.Types

Show RawQuery # 
Instance details

Defined in Napkin.Types

Generic RawQuery # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep RawQuery :: Type -> Type #

Methods

from :: RawQuery -> Rep RawQuery x #

to :: Rep RawQuery x -> RawQuery #

NFData RawQuery # 
Instance details

Defined in Napkin.Types

Methods

rnf :: RawQuery -> () #

Lift RawQuery # 
Instance details

Defined in Napkin.Types

type Rep RawQuery # 
Instance details

Defined in Napkin.Types

type Rep RawQuery = D1 ('MetaData "RawQuery" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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)))

data Query #

Constructors

Query 
Union 

Fields

QueryRaw RawQuery

Escape hatch: A raw query with all the dependencies contained therein. Avoid if possible.

Instances

Instances details
Eq Query # 
Instance details

Defined in Napkin.Types

Methods

(==) :: Query -> Query -> Bool #

(/=) :: Query -> Query -> Bool #

Data Query # 
Instance details

Defined in Napkin.Types

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 #

toConstr :: Query -> Constr #

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 #

Ord Query # 
Instance details

Defined in Napkin.Types

Methods

compare :: Query -> Query -> Ordering #

(<) :: Query -> Query -> Bool #

(<=) :: Query -> Query -> Bool #

(>) :: Query -> Query -> Bool #

(>=) :: Query -> Query -> Bool #

max :: Query -> Query -> Query #

min :: Query -> Query -> Query #

Show Query # 
Instance details

Defined in Napkin.Types

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

Generic Query # 
Instance details

Defined in Napkin.Types

Associated Types

type Rep Query :: Type -> Type #

Methods

from :: Query -> Rep Query x #

to :: Rep Query x -> Query #

NFData Query # 
Instance details

Defined in Napkin.Types

Methods

rnf :: Query -> () #

MaybeQuery Query # 
Instance details

Defined in Napkin.Types

Methods

getQuery :: Query -> Maybe Query #

HasDefinition Query # 
Instance details

Defined in Napkin.Types

AsRelation Query # 
Instance details

Defined in Napkin.Types

Methods

asRelation :: Query -> Relation #

HasDeps Query # 
Instance details

Defined in Napkin.Types

Lift Query # 
Instance details

Defined in Napkin.Types

Methods

lift :: Query -> Q Exp #

liftTyped :: Query -> Q (TExp Query) #

RenderSql Query Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Query -> Doc #

RenderSql Query Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Query -> Doc #

RenderSql Query Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Query -> Doc #

RenderSql Query BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Query -> Doc #

(ReifiesBackend b, ParseSQL b) => FromJSON (WithBackend b Query) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Backends

type Rep Query # 
Instance details

Defined in Napkin.Types

type Rep Query = D1 ('MetaData "Query" "Napkin.Types" "napkin-0.5.11-AmFJpcsQ4Ny8ZeMMGxUvw7" '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 "_queryFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe From)) :*: (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))))) :+: (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))))

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

forall s.(AsRelation s, HasDefinition s) => DefinedRelation s 

Instances

Instances details
AsRelation DefinedRelation # 
Instance details

Defined in Napkin.Types

data DefinedQuery #

Like DefinedRelation, but only requires a defined query.

Constructors

forall s.HasDefinition s => DefinedQuery s 

class AsRelation s where #

Methods

asRelation :: s -> Relation #

Instances

Instances details
AsRelation DefinedRelation # 
Instance details

Defined in Napkin.Types

AsRelation Query # 
Instance details

Defined in Napkin.Types

Methods

asRelation :: Query -> Relation #

AsRelation Relation # 
Instance details

Defined in Napkin.Types

AsRelation CreateViewAs # 
Instance details

Defined in Napkin.Types.Commands

AsRelation (Q a) # 
Instance details

Defined in Napkin.Untyped.Monad

Methods

asRelation :: Q a -> Relation #

AsRelation (CreateTableAs m) # 
Instance details

Defined in Napkin.Types.Commands

AsRelation (TableSpec b) # 
Instance details

Defined in Napkin.Spec.Types

AsRelation (Ref a) # 
Instance details

Defined in Napkin.Types

Methods

asRelation :: Ref a -> Relation #

AsRelation (CreateTableAs m) # 
Instance details

Defined in Napkin.Spec.Types

class HasDefinition s where #

Methods

defQuery :: Lens s s Query Query #

Instances

Instances details
HasDefinition Query # 
Instance details

Defined in Napkin.Types

HasDefinition (Q ()) # 
Instance details

Defined in Napkin.Untyped.Monad

Methods

defQuery :: Lens (Q ()) (Q ()) Query Query #

HasDefinition (CreateTableAs m) # 
Instance details

Defined in Napkin.Types.Commands

HasDefinition (CreateTableAs m) # 
Instance details

Defined in Napkin.Spec.Types

class MaybeQuery s where #

Things that may or may not contain an explicit Query inside

Methods

getQuery :: s -> Maybe Query #

Instances

Instances details
MaybeQuery Query # 
Instance details

Defined in Napkin.Types

Methods

getQuery :: Query -> Maybe Query #

MaybeQuery Relation # 
Instance details

Defined in Napkin.Types

MaybeQuery (Q ()) # 
Instance details

Defined in Napkin.Untyped.Monad

Methods

getQuery :: Q () -> Maybe Query #

MaybeQuery (CreateTableAs m) # 
Instance details

Defined in Napkin.Types.Commands

MaybeQuery (CreateTableAs m) # 
Instance details

Defined in Napkin.Spec.Types

queryFullySpecified :: Data a => a -> Bool #

Has select * been used anywhere inside this thing? If so, False.

unRef :: forall a a. Iso (Ref a) (Ref a) (NonEmpty Name) (NonEmpty Name) #

selectRef :: forall a. Lens' (Selected a) (Ref a) #

selectItem :: forall a. Lens' (Selected a) a #

aliasRef :: forall a. Lens' (Alias a) (Maybe (Ref a)) #

aliasItem :: forall a. Lens' (Alias a) a #

class Val a where #

Methods

val :: Prism' Value a #

Instances

Instances details
Val Bool # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Bool #

Val Double #

Auto-convert from VInt and VText

Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Double #

Val Int # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Int #

Val Int64 #

Auto-convert from VText

Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Int64 #

Val Integer # 
Instance details

Defined in Napkin.Types

Val ByteString # 
Instance details

Defined in Napkin.Types

Val String # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value String #

Val Text # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Text #

Val UTCTime # 
Instance details

Defined in Napkin.Types

Val Day # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Day #

Val DatePart # 
Instance details

Defined in Napkin.Types

Val IntInterval # 
Instance details

Defined in Napkin.Types

Val Value # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value Value #

Val [SExp] # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value [SExp] #

Val a => Val (Maybe a) # 
Instance details

Defined in Napkin.Types

Methods

val :: Prism' Value (Maybe a) #

integral :: (Integral a, Integral b) => Iso' a b #

_lit :: Val a => Prism' SExp a #

lit :: Val a => a -> SExp #

interval :: [(Double, DatePart)] -> SExp #

Shorthand for using literal Doubles in making interval expressions.

txt :: String -> SExp #

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)

class TableRef a where #

Methods

tableRef :: Lens' a (Ref Table) #

Instances

Instances details
TableRef DeleteFrom # 
Instance details

Defined in Napkin.Types.Commands

TableRef InsertIntoQuery # 
Instance details

Defined in Napkin.Types.Commands

TableRef DropView # 
Instance details

Defined in Napkin.Types.Commands

TableRef CreateViewAs # 
Instance details

Defined in Napkin.Types.Commands

TableRef (CreateTableAs m) # 
Instance details

Defined in Napkin.Types.Commands

TableRef (TableSpec b) # 
Instance details

Defined in Napkin.Spec.Types

Methods

tableRef :: Lens' (TableSpec b) (Ref Table) #

TableRef (Ref Table) # 
Instance details

Defined in Napkin.Types

Methods

tableRef :: Lens' (Ref Table) (Ref Table) #

TableRef (CreateTableAs m) # 
Instance details

Defined in Napkin.Spec.Types

class HasDeps a where #

Class of things that have external table dependencies

Instances

Instances details
HasDeps Query # 
Instance details

Defined in Napkin.Types

HasDeps From # 
Instance details

Defined in Napkin.Types

HasDeps Relation # 
Instance details

Defined in Napkin.Types

HasDeps SExp # 
Instance details

Defined in Napkin.Types

HasDeps ML_Predict # 
Instance details

Defined in Napkin.Types.Commands.BigQuery

HasDeps CreateModel # 
Instance details

Defined in Napkin.Types.Commands.BigQuery

HasDeps CreateViewAs # 
Instance details

Defined in Napkin.Types.Commands

HasDeps a => HasDeps [a] # 
Instance details

Defined in Napkin.Types

HasDeps a => HasDeps (Selected a) # 
Instance details

Defined in Napkin.Types

HasDeps (CreateTableAs m) # 
Instance details

Defined in Napkin.Types.Commands

HasDeps (Ref Table) # 
Instance details

Defined in Napkin.Types

HasDeps (CreateTableAs m) # 
Instance details

Defined in Napkin.Spec.Types

(^...) :: Ord a => s -> Getting (Endo (Set a)) s a -> Set a #

queryDependencies :: Data s => Traversal' s (Ref Table) #

Figure out external table dependencies within a construct - e.g. Query or one of the commands.

TODO Potential (unsure) bugs in here due to inner scopes spilling and clashing with names in outer scopes. Seems to work but can use proper extensive testing.

rawRelation :: HasDeps s => (s -> String) -> s -> Relation #

Extract deps from object, render to string and wrap into a RawRelation

varAs :: Ref a -> Selected SExp #

Polymorphic to support refs that come out of Relations, etc.

asSelf :: SExp -> Selected SExp #

Deprecated: Deprecated, can cause issues if SExp is not Var. Please use varAs or as as necessary

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.

refName :: Traversal (Ref a) (Ref a1) String String #

Pull the last name out of a Ref. E.g. if Ref contains a schema.table_name, pull just the table_name out.

refRoot :: Lens' (Ref a) Name #

Get final segments on the ref path and grab the name

refJustRoot :: Ref a -> Ref a #

ne :: Iso' [a] (NonEmpty a) #

atAlias :: (Applicative f, Choice p) => Ref t -> Optic' p f (Alias t) (Alias t) #

scopeRefs :: Data b => Ref t -> b -> b #

Attach all column references within expression to given (table) reference.

modifyExterns :: Data b => (ExternFun -> SExp) -> b -> b #

(^^.) :: Ref Relation -> Name -> SExp infixl 9 #

Attach given name on the relation

data AggLevel #

Constructors

Unit

Expression is at the row level

Agg

Aggregate functions, like sum

Analytic

Analytic level (some backends)

Instances

Instances details
Eq AggLevel # 
Instance details

Defined in Napkin.Types

Data AggLevel # 
Instance details

Defined in Napkin.Types

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 #

Ord AggLevel # 
Instance details

Defined in Napkin.Types

Show AggLevel # 
Instance details

Defined in Napkin.Types

data StatsType #

Constructors

HookStats 
ActionStats 

Instances

Instances details
Eq StatsType # 
Instance details

Defined in Napkin.Types

Ord StatsType # 
Instance details

Defined in Napkin.Types

Show StatsType # 
Instance details

Defined in Napkin.Types

data TrackingQueryStats #

Used for tracking per-table and hook query statistics.

Constructors

TrackingQueryStats 

Fields

queryStatsForTable :: Ref Table -> TrackingQueryStats -> (Maybe QueryStats, Maybe QueryStats) #

returns QueryStats, for the table creation spec and also for the spec's tables

data QueryStats #

Used for aggregate statistics gathered from running queries.

Instances

Instances details
Eq QueryStats # 
Instance details

Defined in Napkin.Types

Show QueryStats # 
Instance details

Defined in Napkin.Types

Semigroup QueryStats # 
Instance details

Defined in Napkin.Types

Monoid QueryStats # 
Instance details

Defined in Napkin.Types

data QueryTransformer #

Constructors

QueryTransformer 

Fields

Orphan instances

(Lift k, Lift v) => Lift (OMap k v :: Type) # 
Instance details

Methods

lift :: OMap k v -> Q Exp #

liftTyped :: OMap k v -> Q (TExp (OMap k v)) #

Ord k => Semigroup (OMap k v) # 
Instance details

Methods

(<>) :: OMap k v -> OMap k v -> OMap k v #

sconcat :: NonEmpty (OMap k v) -> OMap k v #

stimes :: Integral b => b -> OMap k v -> OMap k v #

Ord k => Monoid (OMap k v) # 
Instance details

Methods

mempty :: OMap k v #

mappend :: OMap k v -> OMap k v -> OMap k v #

mconcat :: [OMap k v] -> OMap k v #

(NFData k, NFData v) => NFData (OMap k v) # 
Instance details

Methods

rnf :: OMap k v -> () #

Ord k => Ixed (OMap k a) # 
Instance details

Methods

ix :: Index (OMap k a) -> Traversal' (OMap k a) (IxValue (OMap k a)) #

Ord k => At (OMap k a) # 
Instance details

Methods

at :: Index (OMap k a) -> Lens' (OMap k a) (Maybe (IxValue (OMap k a))) #