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
|`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.|
|`node.psql(dbname, query)`| Runs query via `psql` command and returns tuple `(error code, stdout, stderr)`. |
102
+
|`node.safe_psql(dbname, 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(dbname, query)`| 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(dbname, username)`| Returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction. |
105
105
106
106
The last one is the most powerful: you can use `begin(isolation_level)`, `commit()` and `rollback()`:
107
107
```python
@@ -127,6 +127,7 @@ with testgres.get_new_node('master') as master:
0 commit comments