From 5369d269ae4e3d24be9cda8900e968014b80ccc0 Mon Sep 17 00:00:00 2001 From: Vincent Ahrend Date: Mon, 27 Jun 2022 16:02:27 +0200 Subject: [PATCH] Edit comments --- README.md | 2 +- aquadoggo/src/config.rs | 2 +- aquadoggo/src/db/stores/task.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 522c661f9..d91da41e7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Configurable node server implementation for the [`p2panda`] network running as a - Awaits signed operations from clients via GraphQL. - Verifies the consistency, format and signature of operations and rejects invalid ones. -- Stores operations of the network in a SQL database of your choice (SQLite, PostgreSQL). +- Stores operations of the network in an SQL database of your choice (SQLite, PostgreSQL). - Materializes views on top of the known data. - Answers filterable and paginated data queries via GraphQL. - Discovers other nodes in local network and internet. diff --git a/aquadoggo/src/config.rs b/aquadoggo/src/config.rs index 562f71258..810ba3081 100644 --- a/aquadoggo/src/config.rs +++ b/aquadoggo/src/config.rs @@ -27,7 +27,7 @@ pub struct Configuration { /// Path to data directory. pub base_path: Option, - /// Database url (sqlite or postgres). + /// Database url (SQLite or PostgreSQL). pub database_url: Option, /// Maximum number of database connections in pool. diff --git a/aquadoggo/src/db/stores/task.rs b/aquadoggo/src/db/stores/task.rs index 7279bc34e..c82e08f9d 100644 --- a/aquadoggo/src/db/stores/task.rs +++ b/aquadoggo/src/db/stores/task.rs @@ -62,7 +62,8 @@ impl SqlStorage { tasks WHERE name = $1 - -- Use `IS` because these columns can contain `null` values. + -- Use `COALESCE` to compare possible null values in a way + -- that is compatible between SQLite and PostgreSQL. AND COALESCE(document_id, '0') = COALESCE($2, '0') AND COALESCE(document_view_id, '0') = COALESCE($3, '0') ",