Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f74dde

Browse files
committed
Merge branch 'master' of github.com:postgrespro/testgres
2 parents 4f00dbb + 3cbb3a5 commit 1f74dde

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

+8-6
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)