-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransactions.proto
More file actions
166 lines (132 loc) · 3.15 KB
/
transactions.proto
File metadata and controls
166 lines (132 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
syntax = "proto3";
option go_package = "github.com/RelationalAI/logical-query-protocol/sdks/go/src/lqp/v1";
package relationalai.lqp.v1;
import "relationalai/lqp/v1/fragments.proto";
import "relationalai/lqp/v1/logic.proto";
message Transaction {
repeated Epoch epochs = 1;
Configure configure = 2;
optional Sync sync = 3;
}
message Configure {
int64 semantics_version = 1;
IVMConfig ivm_config = 2;
OptimizationLevel optimization_level = 3;
}
message IVMConfig {
MaintenanceLevel level = 1;
}
enum MaintenanceLevel {
MAINTENANCE_LEVEL_UNSPECIFIED = 0;
MAINTENANCE_LEVEL_OFF = 1;
MAINTENANCE_LEVEL_AUTO = 2;
MAINTENANCE_LEVEL_ALL = 3;
}
enum OptimizationLevel {
OPTIMIZATION_LEVEL_UNSPECIFIED = 0;
OPTIMIZATION_LEVEL_DEFAULT = 1;
OPTIMIZATION_LEVEL_CONSERVATIVE = 2;
OPTIMIZATION_LEVEL_AGGRESSIVE = 3;
}
message Sync {
repeated FragmentId fragments = 1;
}
message Epoch {
repeated Write writes = 1;
repeated Read reads = 2;
}
//
// Write operations
//
message Write {
reserved 4; // Sync is now at transaction level
oneof write_type {
Define define = 1;
Undefine undefine = 2;
Context context = 3;
Snapshot snapshot = 5;
}
}
message Define {
Fragment fragment = 1;
}
message Undefine {
FragmentId fragment_id = 1;
}
message Context {
repeated RelationId relations = 1;
}
// A single (destination, source) pair within a Snapshot action.
message SnapshotMapping {
repeated string destination_path = 1;
RelationId source_relation = 2;
}
// Demand the source IDBs, take immutable snapshots, and turn them into EDBs under the
// given paths (specified as sequences of strings, see EDB).
message Snapshot {
repeated SnapshotMapping mappings = 1;
}
//
// Export config
//
message ExportCSVConfig {
string path = 1;
ExportCSVSource csv_source = 10;
CSVConfig csv_config = 11;
// Below are all deprecated in favour of the `csv_config` above.
repeated ExportCSVColumn data_columns = 2;
optional int64 partition_size = 3;
optional string compression = 4;
optional bool syntax_header_row = 5;
optional string syntax_missing_string = 6;
optional string syntax_delim = 7;
optional string syntax_quotechar = 8;
optional string syntax_escapechar = 9;
// TODO: support data integration options, e.g., private tokens for private buckets etc.
}
message ExportCSVColumn {
string column_name = 1;
RelationId column_data = 2;
}
message ExportCSVColumns {
repeated ExportCSVColumn columns = 1;
}
message ExportCSVSource {
oneof csv_source {
ExportCSVColumns gnf_columns = 1;
RelationId table_def = 2;
}
}
//
// Read operations
//
message Read {
oneof read_type {
Demand demand = 1;
Output output = 2;
WhatIf what_if = 3;
Abort abort = 4;
Export export = 5;
}
}
message Demand {
RelationId relation_id = 1;
}
message Output {
string name = 1;
RelationId relation_id = 2;
}
message Export {
oneof export_config {
ExportCSVConfig csv_config = 1;
// TODO: support JSON export
}
}
message WhatIf {
string branch = 1;
Epoch epoch = 2;
}
message Abort {
string name = 1;
RelationId relation_id = 2;
}