Skip to content

Commit 3cbb3a5

Browse files
authored
Update README.md
1 parent 18d6d79 commit 3cbb3a5

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy