Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions meta/src/meta/grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
%nonterm specialized_value logic.Value
%nonterm string_type logic.StringType
%nonterm sum_monoid logic.SumMonoid
%nonterm snapshot transactions.Snapshot
%nonterm sync transactions.Sync
%nonterm term logic.Term
%nonterm terms Sequence[logic.Term]
Expand Down Expand Up @@ -304,6 +305,10 @@ write
construct: $$ = transactions.Write(context=$1)
deconstruct if builtin.has_proto_field($$, 'context'):
$1: transactions.Context = $$.context
| snapshot
construct: $$ = transactions.Write(snapshot=$1)
deconstruct if builtin.has_proto_field($$, 'snapshot'):
$1: transactions.Snapshot = $$.snapshot

define
: "(" "define" fragment ")"
Expand Down Expand Up @@ -991,6 +996,13 @@ context
construct: $$ = transactions.Context(relations=$3)
deconstruct: $3: Sequence[logic.RelationId] = $$.relations

snapshot
: "(" "snapshot" rel_edb_path relation_id ")"
construct: $$ = transactions.Snapshot(destination_path=$3, source_relation=$4)
deconstruct:
$3: Sequence[String] = $$.destination_path
$4: logic.RelationId = $$.source_relation

epoch_reads
: "(" "reads" read* ")"

Expand Down
8 changes: 8 additions & 0 deletions proto/relationalai/lqp/v1/transactions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ message Write {
Define define = 1;
Undefine undefine = 2;
Context context = 3;
Snapshot snapshot = 5;
}
}

Expand All @@ -63,6 +64,13 @@ message Context {
repeated RelationId relations = 1;
}

// Demand the source IDB, take an immutable snapshot, and turn it into an EDB under the
// given path (specified as a sequence of strings, see RelEDB).
message Snapshot {
repeated string destination_path = 1;
RelationId source_relation = 2;
}

//
// Export config
//
Expand Down
Loading
Loading