remove commented queries

This commit is contained in:
Efim Poberezkin committed 2021-01-04 18:01:11 +04:00
1 parent 9a1ffb349a
commit 2e761b20f6
1 file changed
-59
@@ -205,62 +205,3 @@ instance MonadUnliftIO m => MonadAgentStore SQLiteStore m where
qId <- insertSndQueue st serverId sndQueue -- TODO test for duplicate connAlias
insertSndConnection st connAlias qId
return $ SendConnection connAlias sndQueue
-- id <- query conn "INSERT ..."
-- query conn "INSERT ..."
-- sqlite queries to create server, queue and connection
-- *** step 1 - insert server before create request to server
-- ! "INSERT OR REPLACE INTO" with autoincrement apparently would change id,
-- ! so going with "ON CONFLICT UPDATE" here
-- INSERT INTO servers (host_address, port, key_hash)
-- VALUES ({host_address}, {port}, {key_hash})
-- ON CONFLICT(host_address, port) DO UPDATE SET
-- host_address=excluded.host_address,
-- port=excluded.port,
-- key_hash=excluded.key_hash;
-- *** step 2 - insert queue and connection after server's response
-- BEGIN TRANSACTION;
-- INSERT INTO recipient_queues (
-- server_id,
-- rcv_id,
-- rcv_private_key,
-- snd_id,
-- snd_key,
-- decrypt_key,
-- verify_key,
-- status,
-- ack_mode
-- )
-- VALUES (
-- {server_id},
-- {rcv_id},
-- {rcv_private_key},
-- {snd_id},
-- {snd_key},
-- {decrypt_key},
-- {verify_key},
-- {status},
-- {ack_mode}
-- );
-- INSERT INTO connections (
-- conn_alias,
-- recipient_queue_id,
-- sender_queue_id
-- )
-- VALUES (
-- {conn_alias},
-- {recipient_queue_id},
-- NULL
-- );
-- COMMIT;
-- ***