Skip to content

Commit

Permalink
Fix typo in database table name and remove unused
Browse files Browse the repository at this point in the history
variable.
  • Loading branch information
fontanierh committed Nov 13, 2023
1 parent c0fd006 commit cd6f7b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/stores/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@ impl Store for PostgresStore {

let mut params: Vec<&(dyn ToSql + Sync)> = vec![&table_row_id];
let mut query = "SELECT created, row_id, content FROM databases_rows \
WHERE tbale = $1 ORDER BY created DESC"
WHERE database_table = $1 ORDER BY created DESC"
.to_string();

let limit_i64: i64;
Expand All @@ -2342,7 +2342,6 @@ impl Store for PostgresStore {
let created: i64 = row.get(0);
let row_id: String = row.get(1);
let data: String = row.get(2);
let table_id: String = row.get(3);
let content: Value = serde_json::from_str(&data)?;
Ok(DatabaseRow::new(
created as u64,
Expand All @@ -2358,7 +2357,7 @@ impl Store for PostgresStore {
Some(_) => {
let t: i64 = c
.query_one(
"SELECT COUNT(*) FROM databases_rows WHERE table = $1",
"SELECT COUNT(*) FROM databases_rows WHERE database_table = $1",
&[&table_row_id],
)
.await?
Expand Down

0 comments on commit cd6f7b9

Please sign in to comment.