Skip to content

Commit e580dc2

Browse files
committed
add dunder all to query module
1 parent f27658f commit e580dc2

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

examples/query-service/basic_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def callee(session):
3232

3333
tx.begin()
3434

35-
tx.execute("""INSERT INTO example (key, value) VALUES (0033, "onepieceisreal");""")
35+
tx.execute("""INSERT INTO example (key, value) VALUES (0055, "onepieceisreal");""")
3636

3737
for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""):
3838
print(f"rows: {str(result_set.rows)}")
@@ -52,7 +52,7 @@ def callee(session):
5252

5353
tx.begin()
5454

55-
tx.execute("""INSERT INTO example (key, value) VALUES (0044, "onepieceisreal");""")
55+
tx.execute("""INSERT INTO example (key, value) VALUES (0066, "onepieceisreal");""")
5656

5757
for result_set in tx.execute("""SELECT COUNT(*) FROM example;"""):
5858
print(f"rows: {str(result_set.rows)}")

ydb/query/__init__.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
__all__ = [
2+
"QueryOnlineReadOnly",
3+
"QuerySerializableReadWrite",
4+
"QuerySnapshotReadOnly",
5+
"QueryStaleReadOnly",
6+
"QuerySessionPool",
7+
"QueryClientSync"
8+
]
9+
110
from .base import (
211
IQueryClient,
312
SupportedDriverType,
@@ -7,13 +16,13 @@
716
from .session import QuerySessionSync
817

918
from .._grpc.grpcwrapper.ydb_query_public_types import (
10-
QueryOnlineReadOnly, # noqa
11-
QuerySerializableReadWrite, # noqa
12-
QuerySnapshotReadOnly, # noqa
13-
QueryStaleReadOnly, # noqa
19+
QueryOnlineReadOnly,
20+
QuerySerializableReadWrite,
21+
QuerySnapshotReadOnly,
22+
QueryStaleReadOnly,
1423
)
1524

16-
from .pool import QuerySessionPool # noqa
25+
from .pool import QuerySessionPool
1726

1827

1928
class QueryClientSync(IQueryClient):

0 commit comments

Comments
 (0)