implemented ClientCLI DB queries
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user