implemented ClientCLI DB queries

This commit is contained in:
2025-12-23 00:27:02 +05:00
parent d461cae077
commit e2edd4070a
12 changed files with 245 additions and 62 deletions

View File

@@ -3,25 +3,25 @@
typedef struct ServerQueries {
struct {
/* (id, name, description) -> void */
/* ($id, $name, $description) -> void */
tsqlite_statement* insert;
/* (id, name, description) -> void */
/* ($id, $name, $description) -> void */
tsqlite_statement* update;
/* (id) -> 1 or nothing */
/* ($id) -> 1 or nothing */
tsqlite_statement* exists;
} channels;
struct {
/* (channel_id, sender_id, content) -> (id, timestamp) */
/* ($channel_id, $sender_id, $content) -> (id, timestamp) */
tsqlite_statement* insert;
/* (channel_id, first_message_id, count) -> [(id, sender_id, content, timestamp)] */
/* ($channel_id, $first_message_id, $count) -> [(id, sender_id, content, timestamp)] */
tsqlite_statement* get_block;
} messages;
struct {
/* (username, token) -> (id, registration_time) */
/* ($username, $token) -> (id, registration_time) */
tsqlite_statement* insert;
/* (username) -> (id) */
/* ($username) -> (id) */
tsqlite_statement* find_by_username;
/* (id, token) -> 1 or nothing */
/* ($id, $token) -> 1 or nothing */
tsqlite_statement* compare_token;
} users;
} ServerQueries;