From c2268c285648ef02ece04de0d9df0813c6d70ff8 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Sat, 24 Dec 2022 00:43:38 -0800
Subject: refactor everything with more abstraction and a nicer interface

---
 crates/secd/store/sqlite/sql/find_address.sql | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 crates/secd/store/sqlite/sql/find_address.sql

(limited to 'crates/secd/store/sqlite/sql/find_address.sql')

diff --git a/crates/secd/store/sqlite/sql/find_address.sql b/crates/secd/store/sqlite/sql/find_address.sql
new file mode 100644
index 0000000..da1df81
--- /dev/null
+++ b/crates/secd/store/sqlite/sql/find_address.sql
@@ -0,0 +1,8 @@
+select address_public_id
+       , type
+       , value
+       , created_at
+from address
+where (($1 is null) or (address_public_id = $1))
+and (($2 is null) or (type = $2))
+and (($3 is null) or (value = $3));
-- 
cgit v1.2.3

