Expand description
The links interface (ILinks in C#, [doublets::Links] in Rust) as LiNo
documents, so a store behind a LinksServer is used
exactly like a local one through RemoteLinks.
Every request is one top-level link named after the operation and holding exactly one value. The substitution query language ignores that shape (a query needs a restriction and a substitution), so an operation never collides with a query sent to the same server.
| Request | Reply |
|---|---|
(count: (index source target)) | (count: N) |
(each: (index source target)) | one (index: source target) per match |
(create: (source target)) | () ((index: source target)) |
(update: (index source target)) | ((index: s t)) ((index: source target)) per changed link |
(delete: index) | ((index: source target)) () per removed link |
(get-name: link) | (name: 'text'), or nothing |
(set-name: (link 'text')) | (link: N) |
(get-by-name: 'text') | (link: N), or nothing |
(remove-name: link) | nothing |
A restriction holds up to three parts, matched like the raw links
interface matches a query: none matches every link, (index) one link,
(index value) links of that index whose source or target is value,
and (index source target) matches part by part. * matches anything.
Every reference in a reply is a number; failures are (error: 'message').
The changes of a create, update or delete are the net change of every
link it touched, the way clink --changes reports a query: a cascading
delete is one ((index: source target)) () per removed link, without the
intermediate steps by which the store behind the server got there, which
differ between the C# and the Rust stores.
Enums§
- Links
Operation - One call of the links interface.
Constants§
- ANY
- The wire spelling of “any value” in a restriction.
Functions§
- changes_
document - A reply listing
changes, one(before) (after)line each. - link_
lino (index: source target)with plain numbers.- matches
- Whether
linkmatchesrestriction, with the shapes of the raw links interface: see the module documentation. - parse_
changes - The
(before) (after)pairs of acreate,updateordeletereply. - parse_
count - The
countof a(count: N)reply. - parse_
link_ reply - The link of a
set-nameorget-by-namereply. - parse_
links - The links of an
eachreply. - parse_
name - The name of a
get-namereply.
Type Aliases§
- Change
- A
(before, after)change; a missing side isLink::null. - Part
- One part of a restriction:
Nonematches any value.