diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md index ce3724515..262e3bc40 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md @@ -273,10 +273,10 @@ with DaprClient() as d: s1 = StateItem(key="key1", value="value1") s2 = StateItem(key="key2", value="value2") - d.save_states(store_name="statestore", states=[s1,s2]) + d.save_bulk_state(store_name="statestore", states=[s1,s2]) print("States have been stored") - items = d.get_states(store_name="statestore", keys=["key1", "key2"]).items + items = d.get_bulk_state(store_name="statestore", keys=["key1", "key2"]).items print(f"Got items: {[i.data for i in items]}") ``` @@ -357,10 +357,10 @@ with DaprClient() as d: s1 = StateItem(key="key1", value="value1") s2 = StateItem(key="key2", value="value2") - d.save_states(store_name="statestore", states=[s1,s2]) + d.save_bulk_state(store_name="statestore", states=[s1,s2]) print("States have been stored") - d.execute_transaction( + d.execute_state_transaction( store_name="statestore", operations=[ TransactionalStateOperation(key="key1", data="newValue1", operation_type=TransactionOperationType.upsert), @@ -369,7 +369,7 @@ with DaprClient() as d: ) print("State transactions have been completed") - items = d.get_states(store_name="statestore", keys=["key1", "key2"]).items + items = d.get_bulk_state(store_name="statestore", keys=["key1", "key2"]).items print(f"Got items: {[i.data for i in items]}") ``` @@ -406,4 +406,4 @@ You're up and running! Both Dapr and your app logs will appear here. - Read the full [State API reference]({{< ref state_api.md >}}) - Try one of the [Dapr SDKs]({{< ref sdks >}}) -- Build a [stateful service]({{< ref howto-stateful-service.md >}}) \ No newline at end of file +- Build a [stateful service]({{< ref howto-stateful-service.md >}})