Remove
Remove(Ref,TS, Action)
Remove(Ref, TS, Action)
Remove(Ref, TS, Action)
Remove(Ref, TS, Action)
remove(Ref, TS, Action)
Remove(Ref, TS, Action)
Description
The Remove
function deletes an event from a document’s history.
The ref
parameter must be a reference to a document within a
user-defined collection.
Parameters
Argument | Type | Definition and Requirements | ||
---|---|---|---|---|
|
A reference type containing the document that should be removed. |
|||
|
The timestamp when the document’s history should be removed. Can be expressed as either a number of UNIX microseconds since epoch, or as a Timestamp.
|
|||
|
Document Action |
The type of action (create, delete, update) to be removed. |
Examples
The following query changes the history for a document in the "spells" collection. The create event at timestamp 1 is removed.
client.Query(
Remove(
Ref(Collection("spells"), "181388642581742080"),
1,
ActionType.Create
)
);
NullV
result, err := client.Query(
f.Remove(
f.Ref(f.Collection("spells"), "181388642581742080"),
1,
f.ActionCreate))
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
{}
System.out.println(
client.query(
Remove(
Ref(Collection("spells"), Value(181388642581742080L)),
Value(1),
Action.CREATE
)
).get());
null
client.query(
q.Remove(
q.Ref(q.Collection('spells'), '181388642581742080'),
1,
'create'
)
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
null
result = client.query(
q.remove(
q.ref(q.collection("spells"), "181388642581742080"),
ts=1,
action="create"
)
)
print(result)
None
client.query(
Remove(
Ref(Collection("spells"), "181388642581742080"),
ts = 1,
action = "create"
)
)
NullV
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!