Skip to content
Merged
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
5 changes: 4 additions & 1 deletion examples/sql/sql_async_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# for the capabilities of the SQL service. The code sample here is just to
# demonstrate the concept of async usage of the SQL service. When in doubt,
# use the blocking iterator method in `sql_example.py`.
import time

import hazelcast

client = hazelcast.HazelcastClient()
Expand All @@ -15,7 +17,7 @@
# Create mapping for the integers. This needs to be done only once per map.
client.sql.execute(
"""
CREATE MAPPING integers
CREATE OR REPLACE MAPPING integers
TYPE IMap
OPTIONS (
'keyFormat' = 'int',
Expand Down Expand Up @@ -49,3 +51,4 @@ def on_next_row(row_future):
# Request the iterator over rows and add a callback to
# run, when the response comes
result_future.add_done_callback(on_response)
time.sleep(1)