mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-16 10:48:50 +00:00
Store c_content in sogo_cache_folder as a BLOB
This reduces considerably the query time for that column, which can be rather large.
This commit is contained in:
@@ -152,7 +152,7 @@ static EOAttribute *textColumn = nil;
|
||||
- (void) setupFromRecord: (NSDictionary *) record
|
||||
{
|
||||
NSInteger intValue;
|
||||
NSString *propsValue;
|
||||
NSData *content;
|
||||
NSDictionary *newValues;
|
||||
|
||||
objectType = [[record objectForKey: @"c_type"] intValue];
|
||||
@@ -166,10 +166,10 @@ static EOAttribute *textColumn = nil;
|
||||
dateWithTimeIntervalSince1970: (NSTimeInterval) intValue]);
|
||||
deleted = ([[record objectForKey: @"c_deleted"] intValue] > 0);
|
||||
version = [[record objectForKey: @"c_version"] intValue];
|
||||
propsValue = [record objectForKey: @"c_content"];
|
||||
if ([propsValue isNotNull])
|
||||
content = [record objectForKey: @"c_content"];
|
||||
if ([content isNotNull])
|
||||
{
|
||||
newValues = [[propsValue dataByDecodingBase64] BSONValue];
|
||||
newValues = [[content dataByDecodingBase64] BSONValue];
|
||||
[properties addEntriesFromDictionary: newValues];
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user