chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
|
||||
//
|
||||
// TLDBConversationSQL.h
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/20.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TLDBConversationSQL_h
|
||||
#define TLDBConversationSQL_h
|
||||
|
||||
#define CONV_TABLE_NAME @"conversation"
|
||||
|
||||
|
||||
#define SQL_CREATE_CONV_TABLE @"CREATE TABLE IF NOT EXISTS %@(\
|
||||
uid TEXT,\
|
||||
fid TEXT,\
|
||||
conv_type INTEGER DEFAULT (0), \
|
||||
date TEXT,\
|
||||
unread_count INTEGER DEFAULT (0),\
|
||||
ext1 TEXT,\
|
||||
ext2 TEXT,\
|
||||
ext3 TEXT,\
|
||||
ext4 TEXT,\
|
||||
ext5 TEXT,\
|
||||
PRIMARY KEY(uid, fid))"
|
||||
|
||||
|
||||
#define SQL_ADD_CONV @"REPLACE INTO %@ ( uid, fid, conv_type, date, unread_count, ext1, ext2, ext3, ext4, ext5) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||
|
||||
|
||||
#define SQL_SELECT_CONVS @"SELECT * FROM %@ WHERE uid = %@ ORDER BY date DESC"
|
||||
#define SQL_SELECT_CONV_UNREAD @"SELECT unread_count FROM %@ WHERE uid = '%@' and fid = '%@'"
|
||||
|
||||
|
||||
#define SQL_DELETE_CONV @"DELETE FROM %@ WHERE uid = '%@' and fid = '%@'"
|
||||
#define SQL_DELETE_ALL_CONVS @"DELETE FROM %@ WHERE uid = '%@'"
|
||||
|
||||
#endif /* TLDBConversationSQL_h */
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// TLDBConversationStore.h
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/20.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TLDBBaseStore.h"
|
||||
|
||||
@interface TLDBConversationStore : TLDBBaseStore
|
||||
|
||||
/**
|
||||
* 新的会话(未读)
|
||||
*/
|
||||
- (BOOL)addConversationByUid:(NSString *)uid fid:(NSString *)fid type:(NSInteger)type date:(NSDate *)date;
|
||||
|
||||
/**
|
||||
* 更新会话状态(已读)
|
||||
*/
|
||||
- (void)updateConversationByUid:(NSString *)uid fid:(NSString *)fid;
|
||||
|
||||
/**
|
||||
* 查询所有会话
|
||||
*/
|
||||
- (NSArray *)conversationsByUid:(NSString *)uid;
|
||||
|
||||
/**
|
||||
* 未读消息数
|
||||
*/
|
||||
- (NSInteger)unreadMessageByUid:(NSString *)uid fid:(NSString *)fid;
|
||||
|
||||
/**
|
||||
* 删除单条会话
|
||||
*/
|
||||
- (BOOL)deleteConversationByUid:(NSString *)uid fid:(NSString *)fid;
|
||||
|
||||
/**
|
||||
* 删除用户的所有会话
|
||||
*/
|
||||
- (BOOL)deleteConversationsByUid:(NSString *)uid;
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// TLDBConversationStore.m
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/20.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TLDBConversationStore.h"
|
||||
#import "TLDBMessageStore.h"
|
||||
#import "TLDBConversationSQL.h"
|
||||
#import "TLDBManager.h"
|
||||
#import "TLConversation.h"
|
||||
#import "TLMacros.h"
|
||||
|
||||
@interface TLDBConversationStore ()
|
||||
|
||||
@property (nonatomic, strong) TLDBMessageStore *messageStore;
|
||||
|
||||
@end
|
||||
|
||||
@implementation TLDBConversationStore
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.dbQueue = [TLDBManager sharedInstance].messageQueue;
|
||||
BOOL ok = [self createTable];
|
||||
if (!ok) {
|
||||
DDLogError(@"DB: 聊天记录表创建失败");
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)createTable
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_CREATE_CONV_TABLE, CONV_TABLE_NAME];
|
||||
return [self createTable:CONV_TABLE_NAME withSQL:sqlString];
|
||||
}
|
||||
|
||||
- (BOOL)addConversationByUid:(NSString *)uid fid:(NSString *)fid type:(NSInteger)type date:(NSDate *)date;
|
||||
{
|
||||
NSInteger unreadCount = [self unreadMessageByUid:uid fid:fid] + 1;
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_ADD_CONV, CONV_TABLE_NAME];
|
||||
NSArray *arrPara = [NSArray arrayWithObjects:
|
||||
uid,
|
||||
fid,
|
||||
[NSNumber numberWithInteger:type],
|
||||
TLTimeStamp(date),
|
||||
[NSNumber numberWithInteger:unreadCount],
|
||||
@"", @"", @"", @"", @"", nil];
|
||||
BOOL ok = [self excuteSQL:sqlString withArrParameter:arrPara];
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新会话状态(已读)
|
||||
*/
|
||||
- (void)updateConversationByUid:(NSString *)uid fid:(NSString *)fid
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有会话
|
||||
*/
|
||||
- (NSArray *)conversationsByUid:(NSString *)uid
|
||||
{
|
||||
__block NSMutableArray *data = [[NSMutableArray alloc] init];
|
||||
NSString *sqlString = [NSString stringWithFormat: SQL_SELECT_CONVS, CONV_TABLE_NAME, uid];
|
||||
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
while ([retSet next]) {
|
||||
TLConversation *conversation = [[TLConversation alloc] init];
|
||||
conversation.partnerID = [retSet stringForColumn:@"fid"];
|
||||
conversation.convType = [retSet intForColumn:@"conv_type"];
|
||||
NSString *dateString = [retSet stringForColumn:@"date"];
|
||||
conversation.date = [NSDate dateWithTimeIntervalSince1970:dateString.doubleValue];
|
||||
conversation.unreadCount = @([retSet intForColumn:@"unread_count"]).stringValue;
|
||||
[data addObject:conversation];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
|
||||
// 获取conv对应的msg
|
||||
for (TLConversation *conversation in data) {
|
||||
TLMessage * message = [self.messageStore lastMessageByUserID:uid partnerID:conversation.partnerID];
|
||||
if (message) {
|
||||
conversation.content = [message conversationContent];
|
||||
conversation.date = message.date;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
- (NSInteger)unreadMessageByUid:(NSString *)uid fid:(NSString *)fid
|
||||
{
|
||||
__block NSInteger unreadCount = 0;
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_SELECT_CONV_UNREAD, CONV_TABLE_NAME, uid, fid];
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
if ([retSet next]) {
|
||||
unreadCount = [retSet intForColumn:@"unread_count"];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
return unreadCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单条会话
|
||||
*/
|
||||
- (BOOL)deleteConversationByUid:(NSString *)uid fid:(NSString *)fid
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_DELETE_CONV, CONV_TABLE_NAME, uid, fid];
|
||||
BOOL ok = [self excuteSQL:sqlString, nil];
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户的所有会话
|
||||
*/
|
||||
- (BOOL)deleteConversationsByUid:(NSString *)uid
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_DELETE_ALL_CONVS, CONV_TABLE_NAME, uid];
|
||||
BOOL ok = [self excuteSQL:sqlString, nil];
|
||||
return ok;
|
||||
}
|
||||
|
||||
#pragma mark - Getter -
|
||||
- (TLDBMessageStore *)messageStore
|
||||
{
|
||||
if (_messageStore == nil) {
|
||||
_messageStore = [[TLDBMessageStore alloc] init];
|
||||
}
|
||||
return _messageStore;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// TLDBMessageStore.h
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/13.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TLDBBaseStore.h"
|
||||
#import "TLMessage.h"
|
||||
|
||||
@interface TLDBMessageStore : TLDBBaseStore
|
||||
|
||||
#pragma mark - 添加
|
||||
/**
|
||||
* 添加消息记录
|
||||
*/
|
||||
- (BOOL)addMessage:(TLMessage *)message;
|
||||
|
||||
#pragma mark - 查询
|
||||
/**
|
||||
* 获取与某个好友的聊天记录
|
||||
*/
|
||||
- (void)messagesByUserID:(NSString *)userID
|
||||
partnerID:(NSString *)partnerID
|
||||
fromDate:(NSDate *)date
|
||||
count:(NSUInteger)count
|
||||
complete:(void (^)(NSArray *data, BOOL hasMore))complete;
|
||||
|
||||
/**
|
||||
* 获取与某个好友/讨论组的聊天文件
|
||||
*/
|
||||
- (NSArray *)chatFilesByUserID:(NSString *)userID partnerID:(NSString *)partnerID;
|
||||
|
||||
/**
|
||||
* 获取与某个好友/讨论组的聊天图片及视频
|
||||
*/
|
||||
- (NSArray *)chatImagesAndVideosByUserID:(NSString *)userID partnerID:(NSString *)partnerID;
|
||||
|
||||
/**
|
||||
* 最后一条聊天记录(消息页用)
|
||||
*/
|
||||
- (TLMessage *)lastMessageByUserID:(NSString *)userID partnerID:(NSString *)partnerID;
|
||||
|
||||
#pragma mark - 删除
|
||||
/**
|
||||
* 删除单条消息
|
||||
*/
|
||||
- (BOOL)deleteMessageByMessageID:(NSString *)messageID;
|
||||
|
||||
/**
|
||||
* 删除与某个好友/讨论组的所有聊天记录
|
||||
*/
|
||||
- (BOOL)deleteMessagesByUserID:(NSString *)userID partnerID:(NSString *)partnerID;
|
||||
|
||||
/**
|
||||
* 删除用户的所有聊天记录
|
||||
*/
|
||||
- (BOOL)deleteMessagesByUserID:(NSString *)userID;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// TLDBMessageStore.m
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/13.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TLDBMessageStore.h"
|
||||
#import "TLDBMessageStoreSQL.h"
|
||||
#import "TLMacros.h"
|
||||
|
||||
@implementation TLDBMessageStore
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
self.dbQueue = [TLDBManager sharedInstance].messageQueue;
|
||||
BOOL ok = [self createTable];
|
||||
if (!ok) {
|
||||
DDLogError(@"DB: 聊天记录表创建失败");
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)createTable
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_CREATE_MESSAGE_TABLE, MESSAGE_TABLE_NAME];
|
||||
return [self createTable:MESSAGE_TABLE_NAME withSQL:sqlString];
|
||||
}
|
||||
|
||||
- (BOOL)addMessage:(TLMessage *)message
|
||||
{
|
||||
if (message == nil || message.messageID == nil || message.userID == nil || (message.friendID == nil && message.groupID == nil)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSString *fid = @"";
|
||||
NSString *subfid;
|
||||
if (message.partnerType == TLPartnerTypeUser) {
|
||||
fid = message.friendID;
|
||||
}
|
||||
else {
|
||||
fid = message.groupID;
|
||||
subfid = message.friendID;
|
||||
}
|
||||
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_ADD_MESSAGE, MESSAGE_TABLE_NAME];
|
||||
NSArray *arrPara = [NSArray arrayWithObjects:
|
||||
message.messageID,
|
||||
message.userID,
|
||||
fid,
|
||||
TLNoNilString(subfid),
|
||||
TLTimeStamp(message.date),
|
||||
[NSNumber numberWithInteger:message.partnerType],
|
||||
[NSNumber numberWithInteger:message.ownerTyper],
|
||||
[NSNumber numberWithInteger:message.messageType],
|
||||
[message.content mj_JSONString],
|
||||
[NSNumber numberWithInteger:message.sendState],
|
||||
[NSNumber numberWithInteger:message.readState],
|
||||
@"", @"", @"", @"", @"", nil];
|
||||
BOOL ok = [self excuteSQL:sqlString withArrParameter:arrPara];
|
||||
return ok;
|
||||
}
|
||||
|
||||
- (void)messagesByUserID:(NSString *)userID partnerID:(NSString *)partnerID fromDate:(NSDate *)date count:(NSUInteger)count complete:(void (^)(NSArray *, BOOL))complete
|
||||
{
|
||||
__block NSMutableArray *data = [[NSMutableArray alloc] init];
|
||||
NSString *sqlString = [NSString stringWithFormat:
|
||||
SQL_SELECT_MESSAGES_PAGE,
|
||||
MESSAGE_TABLE_NAME,
|
||||
userID,
|
||||
partnerID,
|
||||
[NSString stringWithFormat:@"%lf", date.timeIntervalSince1970],
|
||||
(long)(count + 1)];
|
||||
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
while ([retSet next]) {
|
||||
TLMessage *message = [self p_createDBMessageByFMResultSet:retSet];
|
||||
[data insertObject:message atIndex:0];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
|
||||
BOOL hasMore = NO;
|
||||
if (data.count == count + 1) {
|
||||
hasMore = YES;
|
||||
[data removeObjectAtIndex:0];
|
||||
}
|
||||
complete(data, hasMore);
|
||||
}
|
||||
|
||||
- (NSArray *)chatFilesByUserID:(NSString *)userID partnerID:(NSString *)partnerID
|
||||
{
|
||||
__block NSMutableArray *data = [[NSMutableArray alloc] init];
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_SELECT_CHAT_FILES, MESSAGE_TABLE_NAME, userID, partnerID];
|
||||
|
||||
__block NSDate *lastDate = [NSDate date];
|
||||
__block NSMutableArray *array = [[NSMutableArray alloc] init];
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
while ([retSet next]) {
|
||||
TLMessage * message = [self p_createDBMessageByFMResultSet:retSet];
|
||||
if (([message.date isThisWeek] && [lastDate isThisWeek]) || (![message.date isThisWeek] && [lastDate isSameMonthAsDate:message.date])) {
|
||||
[array addObject:message];
|
||||
}
|
||||
else {
|
||||
lastDate = message.date;
|
||||
if (array.count > 0) {
|
||||
[data addObject:array];
|
||||
}
|
||||
array = [[NSMutableArray alloc] initWithObjects:message, nil];
|
||||
}
|
||||
}
|
||||
if (array.count > 0) {
|
||||
[data addObject:array];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
return data;
|
||||
}
|
||||
|
||||
- (NSArray *)chatImagesAndVideosByUserID:(NSString *)userID partnerID:(NSString *)partnerID
|
||||
{
|
||||
__block NSMutableArray *data = [[NSMutableArray alloc] init];
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_SELECT_CHAT_MEDIA, MESSAGE_TABLE_NAME, userID, partnerID];
|
||||
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
while ([retSet next]) {
|
||||
TLMessage *message = [self p_createDBMessageByFMResultSet:retSet];
|
||||
[data addObject:message];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
return data;
|
||||
}
|
||||
|
||||
- (TLMessage *)lastMessageByUserID:(NSString *)userID partnerID:(NSString *)partnerID
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_SELECT_LAST_MESSAGE, MESSAGE_TABLE_NAME, MESSAGE_TABLE_NAME, userID, partnerID];
|
||||
__block TLMessage * message;
|
||||
[self excuteQuerySQL:sqlString resultBlock:^(FMResultSet *retSet) {
|
||||
while ([retSet next]) {
|
||||
message = [self p_createDBMessageByFMResultSet:retSet];
|
||||
}
|
||||
[retSet close];
|
||||
}];
|
||||
return message;
|
||||
}
|
||||
|
||||
- (BOOL)deleteMessageByMessageID:(NSString *)messageID
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_DELETE_MESSAGE, MESSAGE_TABLE_NAME, messageID];
|
||||
BOOL ok = [self excuteSQL:sqlString, nil];
|
||||
return ok;
|
||||
}
|
||||
|
||||
- (BOOL)deleteMessagesByUserID:(NSString *)userID partnerID:(NSString *)partnerID;
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_DELETE_FRIEND_MESSAGES, MESSAGE_TABLE_NAME, userID, partnerID];
|
||||
BOOL ok = [self excuteSQL:sqlString, nil];
|
||||
return ok;
|
||||
}
|
||||
|
||||
- (BOOL)deleteMessagesByUserID:(NSString *)userID
|
||||
{
|
||||
NSString *sqlString = [NSString stringWithFormat:SQL_DELETE_USER_MESSAGES, MESSAGE_TABLE_NAME, userID];
|
||||
BOOL ok = [self excuteSQL:sqlString, nil];
|
||||
return ok;
|
||||
}
|
||||
|
||||
#pragma mark - Private Methods -
|
||||
- (TLMessage *)p_createDBMessageByFMResultSet:(FMResultSet *)retSet
|
||||
{
|
||||
TLMessageType type = [retSet intForColumn:@"msg_type"];
|
||||
TLMessage * message = [TLMessage createMessageByType:type];
|
||||
message.messageID = [retSet stringForColumn:@"msgid"];
|
||||
message.userID = [retSet stringForColumn:@"uid"];
|
||||
message.partnerType = [retSet intForColumn:@"partner_type"];
|
||||
if (message.partnerType == TLPartnerTypeGroup) {
|
||||
message.groupID = [retSet stringForColumn:@"fid"];
|
||||
message.friendID = [retSet stringForColumn:@"subfid"];
|
||||
}
|
||||
else {
|
||||
message.friendID = [retSet stringForColumn:@"fid"];
|
||||
message.groupID = [retSet stringForColumn:@"subfid"];
|
||||
}
|
||||
NSString *dateString = [retSet stringForColumn:@"date"];
|
||||
message.date = [NSDate dateWithTimeIntervalSince1970:dateString.doubleValue];
|
||||
message.ownerTyper = [retSet intForColumn:@"own_type"];
|
||||
NSString *content = [retSet stringForColumn:@"content"];
|
||||
message.content = [[NSMutableDictionary alloc] initWithDictionary:[content mj_JSONObject]];
|
||||
message.sendState = [retSet intForColumn:@"send_status"];
|
||||
message.readState = [retSet intForColumn:@"received_status"];
|
||||
return message;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// TLDBMessageStoreSQL.h
|
||||
// TLChat
|
||||
//
|
||||
// Created by 李伯坤 on 16/3/13.
|
||||
// Copyright © 2016年 李伯坤. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef TLDBMessageStoreSQL_h
|
||||
#define TLDBMessageStoreSQL_h
|
||||
|
||||
#define MESSAGE_TABLE_NAME @"message"
|
||||
|
||||
|
||||
#define SQL_CREATE_MESSAGE_TABLE @"CREATE TABLE IF NOT EXISTS %@(\
|
||||
msgid TEXT,\
|
||||
uid TEXT,\
|
||||
fid TEXT,\
|
||||
subfid TEXT,\
|
||||
date TEXT,\
|
||||
partner_type INTEGER DEFAULT (0),\
|
||||
own_type INTEGER DEFAULT (0),\
|
||||
msg_type INTEGER DEFAULT (0),\
|
||||
content TEXT,\
|
||||
send_status INTEGER DEFAULT (0),\
|
||||
received_status BOOLEAN DEFAULT (0),\
|
||||
ext1 TEXT,\
|
||||
ext2 TEXT,\
|
||||
ext3 TEXT,\
|
||||
ext4 TEXT,\
|
||||
ext5 TEXT,\
|
||||
PRIMARY KEY(uid, msgid, fid, subfid))"
|
||||
|
||||
|
||||
#define SQL_ADD_MESSAGE @"REPLACE INTO %@ ( msgid, uid, fid, subfid, date, partner_type, own_type, msg_type, content, send_status, received_status, ext1, ext2, ext3, ext4, ext5) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||
|
||||
|
||||
#define SQL_SELECT_MESSAGES_PAGE @"SELECT * FROM %@ WHERE uid = '%@' and fid = '%@' and date < '%@' order by date desc LIMIT '%ld'"
|
||||
#define SQL_SELECT_CHAT_FILES @"SELECT * FROM %@ WHERE uid = '%@' and fid = '%@' and msg_type = '2'"
|
||||
#define SQL_SELECT_CHAT_MEDIA @"SELECT * FROM %@ WHERE uid = '%@' and fid = '%@' and msg_type = '2'"
|
||||
#define SQL_SELECT_LAST_MESSAGE @"SELECT * FROM %@ WHERE date = ( SELECT MAX(date) FROM %@ WHERE uid = '%@' and fid = '%@' )"
|
||||
|
||||
|
||||
#define SQL_DELETE_MESSAGE @"DELETE FROM %@ WHERE msgid = '%@'"
|
||||
#define SQL_DELETE_FRIEND_MESSAGES @"DELETE FROM %@ WHERE uid = '%@' and fid = '%@'"
|
||||
#define SQL_DELETE_USER_MESSAGES @"DELETE FROM %@ WHERE uid = '%@'"
|
||||
|
||||
|
||||
#endif /* TLDBMessageStoreSQL_h */
|
||||
Reference in New Issue
Block a user