mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-22 12:02:26 +00:00
remove commented queries
This commit is contained in:
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;
|
||||
|
||||
-- ***
|
||||
Reference in new issue
Block a user