forked from cory/tildefriends
Rename the DB things.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3656 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
14
src/ssb.db.c
14
src/ssb.db.c
@ -55,7 +55,7 @@ void tf_ssb_db_init(tf_ssb_t* ssb)
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
bool tf_ssb_store_message(tf_ssb_t* ssb, JSContext* context, const char* id, JSValue val, const char* signature)
|
||||
bool tf_ssb_db_store_message(tf_ssb_t* ssb, JSContext* context, const char* id, JSValue val, const char* signature)
|
||||
{
|
||||
bool stored = false;
|
||||
JSValue previousval = JS_GetPropertyStr(context, val, "previous");
|
||||
@ -105,7 +105,7 @@ bool tf_ssb_store_message(tf_ssb_t* ssb, JSContext* context, const char* id, JSV
|
||||
return stored;
|
||||
}
|
||||
|
||||
bool tf_ssb_message_content_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_t* out_size)
|
||||
bool tf_ssb_db_message_content_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_t* out_size)
|
||||
{
|
||||
bool result = false;
|
||||
sqlite3_stmt* statement;
|
||||
@ -130,7 +130,7 @@ bool tf_ssb_message_content_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blo
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tf_ssb_blob_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_t* out_size)
|
||||
bool tf_ssb_db_blob_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_t* out_size)
|
||||
{
|
||||
bool result = false;
|
||||
sqlite3_stmt* statement;
|
||||
@ -155,7 +155,7 @@ bool tf_ssb_blob_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_t*
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tf_ssb_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char* out_id, size_t out_id_size)
|
||||
bool tf_ssb_db_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char* out_id, size_t out_id_size)
|
||||
{
|
||||
bool result = false;
|
||||
sqlite3* db = tf_ssb_get_db(ssb);
|
||||
@ -190,7 +190,7 @@ bool tf_ssb_blob_store(tf_ssb_t* ssb, const uint8_t* blob, size_t size, char* ou
|
||||
return result;
|
||||
}
|
||||
|
||||
bool tf_ssb_get_message_by_author_and_sequence(tf_ssb_t* ssb, const char* author, int64_t sequence, char* out_message_id, size_t out_message_id_size, int64_t* out_timestamp, char** out_content)
|
||||
bool tf_ssb_db_get_message_by_author_and_sequence(tf_ssb_t* ssb, const char* author, int64_t sequence, char* out_message_id, size_t out_message_id_size, int64_t* out_timestamp, char** out_content)
|
||||
{
|
||||
bool found = false;
|
||||
sqlite3_stmt* statement;
|
||||
@ -217,7 +217,7 @@ bool tf_ssb_get_message_by_author_and_sequence(tf_ssb_t* ssb, const char* author
|
||||
return found;
|
||||
}
|
||||
|
||||
bool tf_ssb_get_latest_message_by_author(tf_ssb_t* ssb, const char* author, int64_t* out_sequence, char* out_message_id, size_t out_message_id_size)
|
||||
bool tf_ssb_db_get_latest_message_by_author(tf_ssb_t* ssb, const char* author, int64_t* out_sequence, char* out_message_id, size_t out_message_id_size)
|
||||
{
|
||||
bool found = false;
|
||||
sqlite3_stmt* statement;
|
||||
@ -325,7 +325,7 @@ static int _tf_ssb_sqlite_authorizer(void* user_data, int action_code, const cha
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
|
||||
void tf_ssb_visit_query(tf_ssb_t* ssb, const char* query, const JSValue binds, void (*callback)(JSValue row, void* user_data), void* user_data)
|
||||
void tf_ssb_db_visit_query(tf_ssb_t* ssb, const char* query, const JSValue binds, void (*callback)(JSValue row, void* user_data), void* user_data)
|
||||
{
|
||||
sqlite3* db = tf_ssb_get_db(ssb);
|
||||
sqlite3_stmt* statement;
|
||||
|
Reference in New Issue
Block a user