Qualify recurring occurrence completion with portable graph transactions
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
interface Task id "recurring:task-data" revision "recurring:task-data@1" {
|
||||
queryable value occurrence id "recurring:occurrence" : uint64 {
|
||||
get id "recurring:occurrence:get" execution snapshot targets [browser, server];
|
||||
}
|
||||
queryable value due id "recurring:due" : int64 {
|
||||
get id "recurring:due:get" execution snapshot targets [browser, server];
|
||||
}
|
||||
queryable value title id "recurring:title" : string {
|
||||
get id "recurring:title:get" execution snapshot targets [browser, server];
|
||||
set id "recurring:title:set" execution transaction targets [browser, server];
|
||||
}
|
||||
operation complete id "recurring:complete" : uint64 -> unit {
|
||||
call id "recurring:complete:call" execution transaction targets [browser, server];
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
external atom TaskObject id "recurring:task";
|
||||
package TaskRuntime id "recurring:runtime" revision "recurring:runtime@1" {
|
||||
operation complete id "recurring:runtime:complete" : uint64 -> unit
|
||||
mode call execution transaction targets [browser, server] receiver atom TaskObject requires {
|
||||
state occurrence id "recurring:port:occurrence" : uint64 [read, write];
|
||||
state due id "recurring:port:due" : int64 [read, write];
|
||||
};
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
workspace RecurringTask id "workspace:recurring" revision "workspace:recurring@1" commit "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" {
|
||||
import interface Task;
|
||||
import package TaskRuntime;
|
||||
atom TaskObject id "recurring:task";
|
||||
conform TaskObject as Task id "recurring:task:owner" {
|
||||
private state Occurrence id "recurring:state:occurrence" on TaskObject : uint64 policy register default 0;
|
||||
private state Due id "recurring:state:due" on TaskObject : int64 policy register;
|
||||
private state Title id "recurring:state:title" on TaskObject : string policy register;
|
||||
initialize { due to state Due; title to state Title; };
|
||||
bind occurrence.get to state Occurrence.read;
|
||||
bind due.get to state Due.read;
|
||||
bind title.get to state Title.read;
|
||||
bind title.set to state Title.write;
|
||||
bind complete.call to package TaskRuntime.complete with {
|
||||
occurrence to state Occurrence;
|
||||
due to state Due;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user