TypeDBClient.AttributeTypeType
AttributeType{V} <: AbstractAttributeType

Type parameter V contains the value type of an attribute.

(OBJECT = 0, BOOLEAN = 1, LONG = 2, DOUBLE = 3, STRING = 4, DATETIME = 5)
source
Base.delete!Method
delete!(resp_collector::ResponsCollector, id::Bytes)

The function will close the collecting result channel and remove this from the the resonse collector. Attention! Don't remove a result_channel manually from the Dictionary. This will not be thread safe.

source
Base.push!Method
push!(resp_collector::ResponsCollector, request::T) where {T<:Proto.ProtoType}

Function is meant to give back the result_channel in which the results for one request will be collected. Attention! Don't put a new Id manually on the ResponsCollector. It wouldn't be thread safe

source
TypeDBClient._is_stream_respart_doneMethod

function isstreamrespartdone(req_result::Proto.ProtoType) This function decides how to treat the result. It returns whether it should push the request to the answers and if it should break the retrieving loop.

source
TypeDBClient.batch_requestsMethod

function batchrequests(inchannel::Channel{Proto.ProtoType}, outchannel::Channel{Proto.TransactionClient}) This function contains the whole logic for batching incomming requests. The inner runner function will be called every x ms and will send the collected request in one Transaction_Client message to teh server.

source
TypeDBClient.collect_resultMethod

function collectresult(reschannel::Channel{T}) where {T<:ProtoProtoType} The function will be called for each single request. She works until the whole result set will be collected.

source
TypeDBClient.copy_to_protoMethod

copytoproto(fromobject, toproto_struct::Type{T}) where {T<: ProtoType} perform the conversation from a normal struct to a proto struct. The prerequisite for this is the naming of the variable of the normal struct according to the proto struct which is to be built.

source
TypeDBClient.deleteFunction
delete(transaction::AbstractCoreTransaction, query::AbstractString, options = Proto.Options())

To delete something without using certain functions you can use a TypeQL string put this as an argument to the delete function.

source
TypeDBClient.deleteMethod
delete(r::RemoteConcept{<:AbstractThingType})

To delete a type in the database pack the type with the transaction to a RemoteConcept. Be aware that a type can only be deleted if no Entity, Attribute or Relation is in the database which is based on this type.

source
TypeDBClient.deleteMethod
delete(r::RemoteConcept{<:AbstractThing})

To delete an Entity, Relation or Attribute this have to be packed with the transaction to a RemoteConcept. To accomplish this see the function as_remote.

source
TypeDBClient.deleteMethod
delete(remote::RemoteRule)

To delete a type in the database pack the type with the transaction to a RemoteRule.

source
TypeDBClient.delete_databaseMethod
delete_database(client::AbstractCoreClient, name::AbstractString)

Delete the database for the given name without any question. Be carful. There is no recovery function within this call.

source
TypeDBClient.get_hasFunction
get_has(transaction::AbstractCoreTransaction,
    thing::AbstractThing,
    attribute_type::Optional{AttributeType} = nothing,
    attribute_types::Optional{Vector{<:AbstractAttributeType}} = nothing,
    keys_only = false)

With this function it is possible to get attributes of an entity or a relation. Optional it is possible to restrict the type(s) of attributes which will retrieved from the database. You can decide between only one ore more than one type.

source
TypeDBClient.get_instancesMethod
get_instances(r::RemoteConcept{<:AbstractThingType})

Here you can get all instances for a given Type. The has to be given as a RemoteConcept

source
TypeDBClient.get_ownersFunction
get_owners(transaction::AbstractCoreTransaction,
    attribute::AbstractAttribute,
    thing_type::Optional{AbstractThingType} = nothing)

gives back all things has this attribute

source
TypeDBClient.get_ownersFunction
get_owners(r::RemoteConcept{<: AbstractAttributeType}, only_key = false)

Returns all ThingTypes which owns the given AttributeType

source
TypeDBClient.get_ownsFunction
get_owns(
    r::RemoteConcept{<:AbstractThingType},
    value_type::Optional{EnumType}=nothing,
    keys_only::Bool=false
)

get_owns will give back all thingtypes which owns a given AttributeType

source
TypeDBClient.get_playsMethod
get_plays(r::RemoteConcept{<: AbstractThingType})

Returns which roles are played by the given ThingType

source
TypeDBClient.get_regexMethod
get_regex(r::RemoteConcept{<:AbstractAttributeType})

For AttributeTypes with the value type String it is possible to set a regex pattern to proof the incoming string to fulfill the pattern. Otherwise the insert will fail. The function wil give back a regex string if set. The regex string follows the conventions of the Java programming language.

source
TypeDBClient.get_ruleMethod
get_rule(log_mgr::AbstractLogicManager, label::AbstractString)

The get_rule function will return the rule for the given label

source
TypeDBClient.get_subtypesMethod
get_subtypes(r::RemoteConcept{<:AbstractType})

get_subtypes returns all subtypes for a given type. A specialzation of this function is made for AttributeType.

source
TypeDBClient.get_supertypeMethod
get_supertype(r::RemoteConcept{<:AbstractType})

Returns one step upwards in the chain of types and returns the direct supertype of a given type.

source
TypeDBClient.get_supertypesMethod
get_supertypes(r::RemoteConcept{<:AbstractType})

Here all supertypes in the chain upwards from the given type will be returned.

source
TypeDBClient.process_direct_requestsMethod

function processdirectrequests(inchannel::Channel{Proto.ProtoType}, outchannel::Channel{Proto.Transaction_Client}) This function process the incoming request directly to the server

source
TypeDBClient.put_ruleMethod
put_rule(log_mgr::AbstractLogicManager, label::AbstractString, when::AbstractString, then::AbstractString)

The function gives the possibility to formulate a rule and put it in the database. The when and then clauses will be written in TypeQL terms.

source
TypeDBClient.safe_closeMethod
safe_close(source_to_close)

Close a given resource which implementes the close functionalety safely and only logs potential errors

source
TypeDBClient.set_abstractMethod
set_abstract(r::RemoteConcept{<:AbstractThingType})

In the chain of fine grained functions in the concept section here we can determine a given ThingType is abstract.

source
TypeDBClient.set_hasMethod
set_has(transaction::AbstractCoreTransaction, thing::AbstractThing, attribute::Attribute)

For a given Thing the attribute will set as associated.

source
TypeDBClient.set_labelMethod
set_label(r::RemoteConcept{<:AbstractType},
    new_label_name::AbstractString)

With this function we are able to set the label for a given Type. This gives us the chance to rename a given type. But be prepared, this is only allowed if the type is not instantiated by inserted data.

source
TypeDBClient.set_ownsFunction
set_owns(
    r::RemoteConcept{<:AbstractType},
    attribute_type::AbstractType,
    is_key::Bool=false,
    overriden_type::Optional{AbstractType}=nothing
)

With set_owns it is possible to assign an attribute to a type. If it is needed it is possible to set the attribute as unique. This means for the type where the attribute is set as key only one instance of the type can have a specific attribute: E.g. person entity has a unique email as an attribute. So it is not possible to have two entities with the same email address.

source
TypeDBClient.set_playsFunction
set_plays(
    r::RemoteConcept{<:AbstractThingType},
    role_type::AbstractRoleType,
    overridden_role_type::Optional{AbstractRoleType}=nothing
)

With set_play we are able to set a roletype to an ThingType and it is possible to set a new RoleType instead of the old. Be cautious, this is only allowed for not instantiated types.

source
TypeDBClient.set_regexMethod
set_regex(r::RemoteConcept{<:AbstractAttributeType},
    regex::Optional{AbstractString})

For AttributeTypes with the value type String it is possible to set a regex pattern to check the incoming string matches the pattern, otherwise the insert will fail. The function will set a regex string to a given attribute. The regex string follows the conventions of the Java programming language.

source
TypeDBClient.set_supertypeMethod
set_supertype(r::RemoteConcept{<: AbstractThingType,<: AbstractCoreTransaction},
    super_type::AbstractThingType)

Here we have the chance to set a given ThingType as the supertype of an other Thingtype. Mixing of diffent root types eg. AttributeType with EntityType is not allowed.

source
TypeDBClient.single_requestMethod

function singlerequest(bidirectstream::BidirectionalStream, request::T, batch::Bool) where {T<: Proto.ProtoType} This function process one single request and give back the results from the server to the calling functions. It is an intern function.

source
TypeDBClient.stream_requestMethod

function streamrequest(bidirectstream::BidirectionalStream, request::T, batch::Bool) where {T<: Proto.ProtoType} Here we let the user decide what to do with the result channel. The returned value is the pure result_channel.

source
TypeDBClient.unset_abstractMethod
unset_abstract(r::RemoteConcept{<:AbstractThingType})

With this function it is possible to change an ThingType from abstact to normal behavior which means that the given ThingType can be instanceated.

source
TypeDBClient.unset_hasMethod
unset_has(transaction::AbstractCoreTransaction, thing::AbstractThing, attribute::Attribute)

Here an given attribute will be detached from a given thing

source

API reference to be filled