pub enum OpCode {
Show 34 variants
LoadEventField {
path: FieldPath,
dest: Register,
default: Option<Value>,
},
LoadConstant {
value: Value,
dest: Register,
},
CopyRegister {
source: Register,
dest: Register,
},
CopyRegisterIfNull {
source: Register,
dest: Register,
},
GetEventType {
dest: Register,
},
CreateObject {
dest: Register,
},
SetField {
object: Register,
path: String,
value: Register,
},
SetFields {
object: Register,
fields: Vec<(String, Register)>,
},
GetField {
object: Register,
path: String,
dest: Register,
},
ReadOrInitState {
state_id: u32,
key: Register,
default: Value,
dest: Register,
},
UpdateState {
state_id: u32,
key: Register,
value: Register,
},
AppendToArray {
object: Register,
path: String,
value: Register,
},
GetCurrentTimestamp {
dest: Register,
},
CreateEvent {
dest: Register,
event_value: Register,
},
CreateCapture {
dest: Register,
capture_value: Register,
},
Transform {
source: Register,
dest: Register,
transformation: Transformation,
},
EmitMutation {
entity_name: String,
key: Register,
state: Register,
},
SetFieldIfNull {
object: Register,
path: String,
value: Register,
},
SetFieldMax {
object: Register,
path: String,
value: Register,
},
UpdateTemporalIndex {
state_id: u32,
index_name: String,
lookup_value: Register,
primary_key: Register,
timestamp: Register,
},
LookupTemporalIndex {
state_id: u32,
index_name: String,
lookup_value: Register,
timestamp: Register,
dest: Register,
},
UpdateLookupIndex {
state_id: u32,
index_name: String,
lookup_value: Register,
primary_key: Register,
},
LookupIndex {
state_id: u32,
index_name: String,
lookup_value: Register,
dest: Register,
},
SetFieldSum {
object: Register,
path: String,
value: Register,
},
SetFieldIncrement {
object: Register,
path: String,
},
SetFieldMin {
object: Register,
path: String,
value: Register,
},
SetFieldWhen {
object: Register,
path: String,
value: Register,
when_instruction: String,
entity_name: String,
key_reg: Register,
condition_field: Option<FieldPath>,
condition_op: Option<ComparisonOp>,
condition_value: Option<Value>,
},
SetFieldUnlessStopped {
object: Register,
path: String,
value: Register,
stop_field: String,
stop_instruction: String,
entity_name: String,
key_reg: Register,
},
AddToUniqueSet {
state_id: u32,
set_name: String,
value: Register,
count_object: Register,
count_path: String,
},
ConditionalSetField {
object: Register,
path: String,
value: Register,
condition_field: FieldPath,
condition_op: ComparisonOp,
condition_value: Value,
},
ConditionalIncrement {
object: Register,
path: String,
condition_field: FieldPath,
condition_op: ComparisonOp,
condition_value: Value,
},
EvaluateComputedFields {
state: Register,
computed_paths: Vec<String>,
},
QueueResolver {
state_id: u32,
entity_name: String,
resolver: ResolverType,
input_path: Option<String>,
input_value: Option<Value>,
strategy: ResolveStrategy,
extracts: Vec<ResolverExtractSpec>,
state: Register,
key: Register,
},
UpdatePdaReverseLookup {
state_id: u32,
lookup_name: String,
pda_address: Register,
primary_key: Register,
},
}Variants§
LoadEventField
LoadConstant
CopyRegister
CopyRegisterIfNull
Copy from source to dest only if dest is currently null
GetEventType
CreateObject
SetField
SetFields
GetField
ReadOrInitState
UpdateState
AppendToArray
GetCurrentTimestamp
CreateEvent
CreateCapture
Transform
EmitMutation
SetFieldIfNull
SetFieldMax
UpdateTemporalIndex
Fields
LookupTemporalIndex
UpdateLookupIndex
LookupIndex
SetFieldSum
Sum a numeric value to a field (accumulator)
SetFieldIncrement
Increment a counter field by 1
SetFieldMin
Set field to minimum value
SetFieldWhen
Set field only if a specific instruction type was seen in the same transaction. If not seen yet, defers the operation for later completion.
Fields
condition_op: Option<ComparisonOp>SetFieldUnlessStopped
Set field unless stopped by a specific instruction. Stop is tracked by a per-entity stop flag.
Fields
AddToUniqueSet
Add value to unique set and update count Maintains internal Set, field stores count
ConditionalSetField
Conditionally set a field based on a comparison
Fields
condition_op: ComparisonOpConditionalIncrement
Conditionally increment a field based on a comparison
Fields
condition_op: ComparisonOpEvaluateComputedFields
Evaluate computed fields (calls external hook if provided) computed_paths: List of paths that will be computed (for dirty tracking)
QueueResolver
Queue a resolver for asynchronous enrichment
UpdatePdaReverseLookup
Update PDA reverse lookup table Maps a PDA address to its primary key for reverse lookups