File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -333,6 +333,7 @@ def metadata(self) -> Dict[str, str]:
333333 """Gets metadata."""
334334 return self ._metadata
335335
336+
336337class EncryptRequestIterator (DaprRequest ):
337338 """An iterator for cryptography encrypt API requests.
338339
Original file line number Diff line number Diff line change 9090
9191 # Outbox pattern
9292 # pass in the ("outbox.projection", "true") metadata to the transaction to enable the outbox pattern.
93- d .execute_state_transaction (store_name = storeName , operations = [
94- TransactionalStateOperation (key = "key1" , data = "val1" ,
95- metadata = {"outbox.projection" : "false" }),
96- TransactionalStateOperation (key = "key1" , data = "val2" ,
97- metadata = {"outbox.projection" : "true" }), ], )
98- print ("Transaction with outbox pattern executed successfully!" )
99-
100- val = d .get_state (store_name = storeName , key = "key1" ).data
93+ d .execute_state_transaction (
94+ store_name = storeName ,
95+ operations = [
96+ TransactionalStateOperation (
97+ key = 'key1' , data = 'val1' , metadata = {'outbox.projection' : 'false' }
98+ ),
99+ TransactionalStateOperation (
100+ key = 'key1' , data = 'val2' , metadata = {'outbox.projection' : 'true' }
101+ ),
102+ ],
103+ )
104+ print ('Transaction with outbox pattern executed successfully!' )
105+
106+ val = d .get_state (store_name = storeName , key = 'key1' ).data
101107 print (f'Got value after outbox pattern: { val } ' )
102108
103109 # Transaction delete
You can’t perform that action at this time.
0 commit comments