Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal.Data.Basic.Replace
Documentation
class PrimaryKeyMatch (fields :: [Symbol]) table where Source #
Minimal complete definition
Methods
primaryKeyMatch :: Entity (FromDb c) table -> Var Filtering table -> ConditionExp Source #
Instances
(Ord (TableFieldType table field), TableField table field, ToField (TableFieldType table field), (~) [Symbol] fields ((:) Symbol f fs), PrimaryKeyMatch fields table, (~) ExpressionKind (KindOfDbExp (TableFieldType table field)) LiteralExp) => PrimaryKeyMatch ((:) Symbol field ((:) Symbol f fs)) table Source # | |
(Ord (TableFieldType table field), TableField table field, ToField (TableFieldType table field), (~) ExpressionKind (KindOfDbExp (TableFieldType table field)) LiteralExp) => PrimaryKeyMatch ((:) Symbol field ([] Symbol)) table Source # | |
class SetAllFields fields table where Source #
Minimal complete definition
Methods
setAllFields :: Entity (FromDb c) table -> Var Updating table -> UpdateExp fields table Source #
Instances
SetAllFields ([] Symbol) table Source # | |
(SetAllFields fields table, CheckWithError (Not (Elem Symbol field fields)) ((:<>:) ((:<>:) (Text "Cannot update the field ") (ShowType Symbol field)) (Text " because it's already updated in this expression")), TableField table field, ToField (TableFieldType table field), (~) ExpressionKind (KindOfDbExp (TableFieldType table field)) LiteralExp) => SetAllFields ((:) Symbol field fields) table Source # | |
save :: forall table pk fields c m. (Table table, Just pk ~ TablePrimaryKey table, fields ~ UniqueFields pk, PrimaryKeyMatch fields table, SetAllFields (TableFields table) table, MonadEffect Basic m) => Entity (FromDb c) table -> m (Entity (FromDb Live) table) Source #