MCPcopy Index your code
hub / github.com/pathwaycom/pathway / stream_target

Function stream_target

python/pathway/tests/test_sqlite.py:45–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 connection.commit()
44
45 def stream_target():
46 wait_result_with_checker(FileLinesNumberChecker(output_path, 2), 5, target=None)
47 connection = sqlite3.connect(database_name)
48 cursor = connection.cursor()
49 cursor.execute(
50 """
51 INSERT INTO users (id, login, name) VALUES (3, 'ch123', 'Charlie')"""
52 )
53 connection.commit()
54
55 wait_result_with_checker(FileLinesNumberChecker(output_path, 3), 2, target=None)
56 cursor = connection.cursor()
57 cursor.execute("UPDATE users SET name = 'Bob Smith' WHERE id = 2")
58 connection.commit()
59
60 wait_result_with_checker(FileLinesNumberChecker(output_path, 5), 2, target=None)
61 cursor = connection.cursor()
62 cursor.execute("DELETE FROM users WHERE id = 3")
63 connection.commit()
64
65 class InputSchema(pw.Schema):
66 id: int

Callers

nothing calls this directly

Calls 3

wait_result_with_checkerFunction · 0.90
commitMethod · 0.80

Tested by

no test coverage detected