From 491cb3eb34d20140aed80dbb9edc39c4db5335d2 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sun, 15 Sep 2024 23:50:41 -0400 Subject: Consolidate most repository types into a repo module. Having them contained in the individual endpoint groups conveyed an unintended sense that their intended scope was _only_ that endpoint group. It also made most repo-related import paths _quite_ long. This splits up the repos as follows: * "General applicability" repos - those that are only loosely connected to a single task, and are likely to be shared between tasks - go in crate::repo. * Specialized repos - those tightly connected to a specific task - go in the module for that task, under crate::PATH::repo. In both cases, each repo goes in its own submodule, to make it easier to use the module name as a namespace. Which category a repo goes in is a judgment call. `crate::channel::repo::broadcast` (formerly `channel::repo::messages`) is used outside of `crate::channel`, for example, but its main purpose is to support channel message broadcasts. It could arguably live under `crate::event::repo::channel`, but the resulting namespace is less legible to me. --- ...02d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .sqlx/query-f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json (limited to '.sqlx/query-f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json') diff --git a/.sqlx/query-f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json b/.sqlx/query-f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json new file mode 100644 index 0000000..e2b6d74 --- /dev/null +++ b/.sqlx/query-f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc.json @@ -0,0 +1,44 @@ +{ + "db_name": "SQLite", + "query": "\n\t\t\t\tselect\n\t\t\t\t\tmessage.id as \"id: message::Id\",\n\t\t\t\t\tlogin.id as \"sender_id: login::Id\",\n\t\t\t\t\tlogin.name as sender_name,\n\t\t\t\t\tmessage.body,\n\t\t\t\t\tmessage.sent_at as \"sent_at: DateTime\"\n\t\t\t\tfrom message\n\t\t\t\t\tjoin login on message.sender = login.id\n\t\t\t\twhere channel = $1\n\t\t\t\t\tand coalesce(sent_at > $2, true)\n\t\t\t\torder by sent_at asc\n\t\t\t", + "describe": { + "columns": [ + { + "name": "id: message::Id", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "sender_id: login::Id", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "sender_name", + "ordinal": 2, + "type_info": "Text" + }, + { + "name": "body", + "ordinal": 3, + "type_info": "Text" + }, + { + "name": "sent_at: DateTime", + "ordinal": 4, + "type_info": "Text" + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false, + false, + false, + false + ] + }, + "hash": "f29a6accbc6b4cca6a3b5702d475d33061ffc50b6bd65ac9a950ad6d715ba0bc" +} -- cgit v1.2.3