protocol
typeid_protocol
Type-safe, K-sortable, globally unique identifier (TypeID) generator protocol.
logtalk_load(typeid(loader))staticPublic predicates
generate/1
Generates a random TypeID with an empty type prefix. The UUID suffix is a version 7 UUID.
staticgenerate(TypeID)generate(--text) - onegenerate/2
Generates a random TypeID with the given type prefix. The UUID suffix is a version 7 UUID. Fails if the prefix is not valid per the TypeID specification.
staticgenerate(Prefix,TypeID)generate(+text,--text) - zero_or_onegenerate/3
Generates a random TypeID with the given type prefix. The UUID suffix is a version 7 UUID computed using the given local UTC offset (Z or +HH:MM/-HH:MM) to convert the backend local time to UTC. Fails if the prefix is not valid per the TypeID specification.
staticgenerate(Prefix,Offset,TypeID)generate(+text,+atom,--text) - zero_or_onefrom_uuid/3
Returns the TypeID for the given type prefix and UUID. The UUID is not required to be a version 7 UUID, allowing encoding of other UUID versions at the user discretion. Fails if the prefix is not valid per the TypeID specification or if the UUID cannot be parsed.
staticfrom_uuid(Prefix,UUID,TypeID)from_uuid(+text,+text,--text) - zero_or_oneto_uuid/2
Returns the UUID encoded in the suffix of the given TypeID. Fails if the TypeID is not valid per the TypeID specification.
staticto_uuid(TypeID,UUID)to_uuid(+text,--text) - zero_or_oneprefix/2
Returns the type prefix of the given TypeID. Fails if the TypeID is not valid per the TypeID specification.
staticprefix(TypeID,Prefix)prefix(+text,--text) - zero_or_onesuffix/2
Returns the base32 encoded UUID suffix of the given TypeID. Fails if the TypeID is not valid per the TypeID specification.
staticsuffix(TypeID,Suffix)suffix(+text,--text) - zero_or_onedecompose/3
Decomposes a TypeID into its type prefix and its base32 encoded UUID suffix. Fails if the TypeID is not valid per the TypeID specification.
staticdecompose(TypeID,Prefix,Suffix)decompose(+text,--text,--text) - zero_or_onecompose/3
Composes a TypeID from a type prefix and a base32 encoded UUID suffix. Fails if the prefix or the suffix are not valid per the TypeID specification.
staticcompose(Prefix,Suffix,TypeID)compose(+text,+text,--text) - zero_or_onevalid/1
Succeeds if the given TypeID is valid per the TypeID specification.
staticvalid(TypeID)valid(+text) - zero_or_onevalid_prefix/1
Succeeds if the given type prefix is valid per the TypeID specification.
staticvalid_prefix(Prefix)valid_prefix(+text) - zero_or_onevalid_suffix/1
Succeeds if the given base32 encoded UUID suffix is valid per the TypeID specification.
staticvalid_suffix(Suffix)valid_suffix(+text) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)