Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf343538

Browse files
committed
Fix README
1 parente001345 commitf343538

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import testgres
5353
with testgres.get_new_node('test')as node:
5454
node.init()# run initdb
5555
node.start()# start PostgreSQL
56-
print(node.execute('postgres','select 1'))
56+
print(awaitnode.fetch('postgres','select 1'))
5757
node.stop()# stop PostgreSQL
5858
```
5959

@@ -93,10 +93,10 @@ Finally, our temporary cluster is able to process queries. There are four ways t
9393

9494
The last one is the most powerful: you can use`begin(isolation_level)`,`commit()` and`rollback()`:
9595
```python
96-
with node.connect()as con:
97-
con.begin('serializable')
98-
print(con.execute('select%s',1))
99-
con.rollback()
96+
asyncwith node.connect()as con:
97+
awaitcon.begin('serializable')
98+
print(awaitcon.fetch('select%s',1))
99+
awaitcon.rollback()
100100
```
101101

102102
To stop the server, run:
@@ -115,7 +115,7 @@ with testgres.get_new_node('master') as master:
115115
master.init().start()
116116
with master.backup()as backup:
117117
replica= backup.spawn_replica('replica').start()
118-
print(replica.execute('postgres','select 1'))
118+
print(awaitreplica.fetch('postgres','select 1'))
119119
```
120120

121121
>Note: you could take a look at[`pg_pathman`](https://github.com/postgrespro/pg_pathman) to get an idea of`testgres`' capabilities.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp