The Project:M36 client library is the preferred method for interacting with Project:M36 databases. It supports all features of the DBMS while other interfaces may not.
The client supports both in-process and remote Project:M36 access.
- Import the library's symbols
import ProjectM36.Client
- Create a Connection with a ConnectionInfo in the Either monad
conn <- connectProjectM36 (InProcessConnectionInfo NoPersistence)
- Execute relational expression queries
result <- executeRelationalExpr conn (Union (RelationVariable "x") (RelationVariable "y"))
- Execute database context expressions which modify the current, mutable database context
maybeErr <- executeDatabaseContextExpr conn (Define "person" (attributesFromList [Attribute "name" StringAtomType, Attribute "age" IntAtomType, Attribute "id" StringAtomType]))
- Execute a transaction graph expression
maybeErr <- executeGraphExpr conn (JumpToHead "branch2")
- Close the connection
close conn