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:
Juan Vallés
2015-09-25 12:14:32 +02:00
parent bea2415fad
commit b329513845
2 changed files with 7 additions and 7 deletions

View File

@@ -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