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

Commit3cbb3a5

Browse files
authored
Update README.md
1 parent18d6d79 commit3cbb3a5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ Now we are ready to start:
9494
node.start()
9595
```
9696

97-
Finally our temporary cluster is able to process queries. There are four ways to run them:
98-
99-
*`node.psql(database, query)` - runs query via`psql` command and returns tuple`(error code, stdout, stderr)`
100-
*`node.safe_psql(database, query)` - same as`psql()` except that it returns only`stdout`. If an error occures during the execution, an exception will be thrown.
101-
*`node.execute(database, query, username=None, commit=True)` - connects to postgresql server using`psycopg2` or`pg8000` library (depends on which is installed in your system) and returns two-dimensional array with data.
102-
*`node.connect(database='postgres')` - returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction.
97+
Finally, our temporary cluster is able to process queries. There are four ways to run them:
98+
99+
| Command| Description|
100+
|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
101+
|`node.psql(database, query)`| Runs query via`psql` command and returns tuple`(error code, stdout, stderr)`.|
102+
|`node.safe_psql(database, query)`| Same as`psql()` except that it returns only`stdout`. If an error occures during the execution, an exception will be thrown.|
103+
|`node.execute(database, query, username=None, commit=True)`| Connects to PostgreSQL using`psycopg2` or`pg8000` (depends on which one is installed in your system) and returns two-dimensional array with data.|
104+
|`node.connect(database='postgres')`| Returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction.|
103105

104106
The last one is the most powerful: you can use`begin(isolation_level)`,`commit()` and`rollback()`:
105107
```python

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp