robvandenbogaard / elm-terminusdb / TerminusDb.Api.Connect

This module provides the api call command to connect with 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 : Request msg -> Platform.Cmd.Cmd msg

Connect request command builder, using the parameters from provided Request.


type alias Request msg =
{ message : Result TerminusDb.Woql.Error TerminusDb.Session.Session -> msg
, server : String
, organisation : Maybe String
, database : Maybe String
, repository : TerminusDb.RepoReference
, graph : TerminusDb.Graph
, username : String
, password : String 
}

Represents parameters for a Connect request.

request : (Result TerminusDb.Woql.Error TerminusDb.Session.Session -> msg) -> Request msg

Request builder with defaults.

toServer : String -> Request msg -> Request msg

Helper for setting the database server address for a Connect Request.

asUser : String -> Request msg -> Request msg

Helper for specifying a user account for the Connect Request.

withPassword : String -> Request msg -> Request msg

Helper for providing a password to a Connect Request configuration.

toOrganisation : String -> Request msg -> Request msg

Helper for setting the target database account for a Connect Request.

toDatabase : String -> Request msg -> Request msg

Helper for setting the target database name for a Connect Request.

toRepository : TerminusDb.RepoReference -> Request msg -> Request msg

Helper for specifying a repository reference scope session default.

withGraph : TerminusDb.Graph -> Request msg -> Request msg

Helper for setting a Graph scope session default.