Skip to content

Commit 5481d73

Browse files
committed
Small pool's methods signature fix
1 parent 363fd60 commit 5481d73

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

psqlpy-stress/psqlpy_stress/mocker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,16 @@ async def fill_big_table() -> None:
3737
big_table_amount = 10000000
3838
for _ in range(big_table_amount):
3939
await pool.execute(
40-
"INSERT INTO big_table (string_field, integer_field, json_field, array_field) VALUES($1, $2, $3, $4)",
40+
"INSERT INTO big_table (string_field, integer_field) VALUES($1, $2)",
4141
[
4242
str(uuid.uuid4()),
4343
random.randint(1, 99999999),
44-
generate_random_dict(),
45-
generate_random_array(),
4644
],
4745
)
4846

4947

5048
async def main() -> None:
51-
await fill_users()
49+
await fill_big_table()
5250

5351

5452
if __name__ == "__main__":

src/driver/connection_pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ impl ConnectionPool {
179179
pub async fn execute<'a>(
180180
self_: pyo3::Py<Self>,
181181
querystring: String,
182-
prepared: Option<bool>,
183182
parameters: Option<pyo3::Py<PyAny>>,
183+
prepared: Option<bool>,
184184
) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
185185
let db_pool = pyo3::Python::with_gil(|gil| self_.borrow(gil).0.clone());
186186

@@ -247,8 +247,8 @@ impl ConnectionPool {
247247
pub async fn fetch<'a>(
248248
self_: pyo3::Py<Self>,
249249
querystring: String,
250-
prepared: Option<bool>,
251250
parameters: Option<pyo3::Py<PyAny>>,
251+
prepared: Option<bool>,
252252
) -> RustPSQLDriverPyResult<PSQLDriverPyQueryResult> {
253253
let db_pool = pyo3::Python::with_gil(|gil| self_.borrow(gil).0.clone());
254254

0 commit comments

Comments
 (0)