grakn-0.3.0: A Haskell client for Grakn

Safe HaskellNone
LanguageHaskell2010

Grakn

Synopsis

Documentation

data Match Source #

A Graql match part that finds a pattern in the knowledge base

Instances

data Client Source #

Constructors

Client 

Fields

data Options Source #

Constructors

Options 

Fields

data Var Source #

A variable that will represent a concept in the results

Instances

data Label Source #

A label of something in the knowledge base

data Value Source #

A value of a resource

defaultUrl :: BaseUrl Source #

The default Grakn URL, accessing localhost

defaultKeyspace :: String Source #

The default Grakn keyspace

execute :: IsQuery q => Client -> q -> ExecuteResponse Source #

execute_ :: IsQuery q => Options -> Client -> q -> ExecuteResponse Source #

match :: Convert a Pattern => [a] -> Match Source #

Create a match by providing a list of patterns

get :: [Var] -> Match -> GetQuery Source #

Get variables from a match, intended to be used infix

limit :: Integer -> Match -> Match Source #

Limit a match, intended to be used infix

var :: Text -> Var Source #

Create a variable

label :: Text -> Label Source #

Create a label of something in the knowledge base

isa :: (Convert p Pattern, Convert a VarOrLabel) => p -> a -> Pattern Source #

Specify a property has a particular type

(-:) :: (Convert p Pattern, Convert a VarOrLabel) => p -> a -> Pattern Source #

Specify a property has a particular type

(.:) :: Convert a VarOrLabel => a -> Var -> RolePlayer Source #

A casting in a relation between a role type and a role player

rp :: Var -> RolePlayer Source #

A casting in a relation without a role type

(<:) :: (Convert p Pattern, Convert a RolePlayer) => p -> [a] -> Pattern Source #

Specify a property is a relation between other variables

rel :: Convert a RolePlayer => [a] -> Pattern Source #

Shorthand to define a relation

has :: (Convert p Pattern, Convert a (Either Value Var)) => p -> Label -> a -> Pattern Source #

Specify a property has a resource

hasText :: Convert p Pattern => p -> Label -> Text -> Pattern Source #

Specify a property has a resource

var_ :: Pattern Source #

Create an anonymous variable