robvandenbogaard / elm-terminusdb / TerminusDb.Api.CreateDatabase

This module provides the api call command to create a database on a TerminusDB server.

It gets configured by the Request data type, constructed by the request and with.. convenience helpers, for building the Request in pipeline style.

command : TerminusDb.Session.Session -> Request msg -> Platform.Cmd.Cmd msg

CreateDatabase query command builder, using the provided session for auth token, connection parameters and schema context.


type alias Request msg =
{ message : Result TerminusDb.Woql.Error Basics.Bool -> msg
, name : String
, organisation : String
, label : String
, comment : String
, isPublic : Basics.Bool
, hasSchema : Basics.Bool
, isLocal : Basics.Bool 
}

Represents a CreateDatabase request.

request : (Result TerminusDb.Woql.Error Basics.Bool -> msg) -> String -> Request msg

Request builder with defaults.

withLabel : String -> Request msg -> Request msg

Helper for providing the friendly name of the target database.

withDescription : String -> Request msg -> Request msg

Helper for providing a comment describing the target database.

forOrganisation : String -> Request msg -> Request msg

Helper for providing an organisation (database account) parameter to the request.

local : Basics.Bool -> Request msg -> Request msg

Helper for specifying whether the target database is local or remote.

public : Basics.Bool -> Request msg -> Request msg

Helper for specifying if the target database is to be public.

withSchema : Basics.Bool -> Request msg -> Request msg

Helper for specifying whether the target database needs a schema.