robvandenbogaard / elm-terminusdb / TerminusDb.Schema.Builder

This module exposes query builder functions to define new doctypes.

doctype : String -> TerminusDb.Woql.Value -> List (TerminusDb.Woql.Value -> TerminusDb.Woql.Query) -> TerminusDb.Woql.Query

Helper for building a doctype specification query. Takes the target document type name and parent document class, with a list of queries for further specification of the doctype, carrying a parameter for passing the doctype reference.

Doctype builder helpers

label : TerminusDb.Schema.TranslatedText -> TerminusDb.Woql.Value -> TerminusDb.Woql.Query

Helper for adding a label property/field to a doctype. Takes a translated field description and a reference to the target doctype.

description : TerminusDb.Schema.TranslatedText -> TerminusDb.Woql.Value -> TerminusDb.Woql.Query

Helper for adding a description property/field to a doctype. Takes a translated field description and the a reference to the target doctype.

property : String -> TerminusDb.Woql.Value -> List (TerminusDb.Woql.Value -> TerminusDb.Woql.Query) -> TerminusDb.Woql.Value -> TerminusDb.Woql.Query

Helper for adding a custom property/field to a doctype. Takes the target property name and range, and sets the domain to the specified target doctype. Applies further specification of the property via the provided queries.

graph : TerminusDb.Woql.Value

Helper providing a literal referring to the default graph.