project-m36-0.3: Relational Algebra Engine

Safe HaskellNone
LanguageHaskell2010

ProjectM36.Tupleable

Synopsis

Documentation

toInsertExpr :: forall a t. (Tupleable a, Traversable t) => t a -> RelVarName -> Either RelationalError DatabaseContextExpr Source #

Convert a Traverseable of Tupleables to an Insert DatabaseContextExpr. This is useful for converting, for example, a list of data values to a set of Insert expressions which can be used to add the values to the database.

toDefineExpr :: forall a proxy. Tupleable a => proxy a -> RelVarName -> DatabaseContextExpr Source #

Convert a Tupleable to a create a Define expression which can be used to create an empty relation variable. Use toInsertExpr to insert the actual tuple data. This function is typically used with Proxy.