diff --git a/README.md b/README.md index fc285cf6..3e1034e9 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Finally our temporary cluster is able to process queries. There are four ways to * `node.psql(database, query)` - runs query via `psql` command and returns tuple `(error code, stdout, stderr)` * `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. -* `node.execute(database, query)` - connects to postgresql server using `psycopg2` or `pg8000` library (depends on which is installed in your system) and returns two-dimensional array with data. +* `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. * `node.connect(database='postgres')` - returns connection wrapper (`NodeConnection`) capable of running several queries within a single transaction. The last one is the most powerful: you can use `begin(isolation_level)`, `commit()` and `rollback()`: diff --git a/testgres/testgres.py b/testgres/testgres.py index 14c135bd..4a25c80e 100644 --- a/testgres/testgres.py +++ b/testgres/testgres.py @@ -962,7 +962,7 @@ def poll_query_until(self, raise TimeoutException('Query timeout') - def execute(self, dbname, query, username=None, commit=False): + def execute(self, dbname, query, username=None, commit=True): """ Execute a query and return all rows as list.
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: