sql: replace empty paramsv![] with empty tuples

This commit is contained in:
link2xt
2023-03-15 22:01:22 +00:00
parent 8db64726ea
commit f024909611
17 changed files with 49 additions and 67 deletions

View File

@@ -438,7 +438,7 @@ impl Context {
"DELETE FROM smtp_status_updates
WHERE msg_id IN (SELECT msg_id FROM smtp_status_updates LIMIT 1)
RETURNING msg_id, first_serial, last_serial, descr",
paramsv![],
(),
|row| {
let instance_id: MsgId = row.get(0)?;
let first_serial: StatusUpdateSerial = row.get(1)?;
@@ -1195,7 +1195,7 @@ mod tests {
);
assert_eq!(
t.sql
.count("SELECT COUNT(*) FROM msgs_status_updates;", paramsv![],)
.count("SELECT COUNT(*) FROM msgs_status_updates;", ())
.await?,
0
);
@@ -1543,14 +1543,14 @@ mod tests {
assert_eq!(
t.sql
.count("SELECT COUNT(*) FROM smtp_status_updates", paramsv![],)
.count("SELECT COUNT(*) FROM smtp_status_updates", ())
.await?,
1
);
t.flush_status_updates().await?;
assert_eq!(
t.sql
.count("SELECT COUNT(*) FROM smtp_status_updates", paramsv![],)
.count("SELECT COUNT(*) FROM smtp_status_updates", ())
.await?,
0
);
@@ -1580,7 +1580,7 @@ mod tests {
.await?;
assert_eq!(
t.sql
.count("SELECT COUNT(*) FROM smtp_status_updates", paramsv![],)
.count("SELECT COUNT(*) FROM smtp_status_updates", ())
.await?,
3
);
@@ -1606,7 +1606,7 @@ mod tests {
}
assert_eq!(
t.sql
.count("SELECT COUNT(*) FROM smtp_status_updates", paramsv![],)
.count("SELECT COUNT(*) FROM smtp_status_updates", ())
.await?,
2 - i
);
@@ -1648,7 +1648,7 @@ mod tests {
assert_eq!(
alice
.sql
.count("SELECT COUNT(*) FROM smtp_status_updates", paramsv![],)
.count("SELECT COUNT(*) FROM smtp_status_updates", ())
.await?,
0
);
@@ -2438,7 +2438,7 @@ sth_for_the = "future""#
assert_eq!(
alice
.sql
.count("SELECT COUNT(*) FROM msgs_status_updates;", paramsv![],)
.count("SELECT COUNT(*) FROM msgs_status_updates;", ())
.await?,
0
);
@@ -2461,7 +2461,7 @@ sth_for_the = "future""#
assert!(
alice
.sql
.count("SELECT COUNT(*) FROM msgs_status_updates;", paramsv![],)
.count("SELECT COUNT(*) FROM msgs_status_updates;", ())
.await?
> 0
);