You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-6
Original file line number
Diff line number
Diff line change
@@ -94,12 +94,14 @@ Now we are ready to start:
94
94
node.start()
95
95
```
96
96
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:
|`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. |
103
105
104
106
The last one is the most powerful: you can use `begin(isolation_level)`, `commit()` and `rollback()`:
0 commit comments