From 1c0db09f3ea66dadc190fdf21fc586fdb450b361 Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 29 Jun 2004 19:58:59 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@81 d1b88da0-ebda-0310-925b-ed51d893ca5b --- OGoContentStore/OCSFolder.h | 1 + OGoContentStore/OCSFolderManager.m | 13 +++++++++--- OGoContentStore/ocs_ls.m | 6 ++++-- OGoContentStore/sql/appointment-create.psql | 22 ++++++++++++++++----- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/OGoContentStore/OCSFolder.h b/OGoContentStore/OCSFolder.h index cf9dbc84..db7c90a2 100644 --- a/OGoContentStore/OCSFolder.h +++ b/OGoContentStore/OCSFolder.h @@ -53,6 +53,7 @@ - (NSString *)folderName; - (NSString *)path; - (NSURL *)location; +- (NSURL *)quickLocation; - (NSString *)folderTypeName; - (OCSFolderManager *)folderManager; diff --git a/OGoContentStore/OCSFolderManager.m b/OGoContentStore/OCSFolderManager.m index c2f4b8a8..27604255 100644 --- a/OGoContentStore/OCSFolderManager.m +++ b/OGoContentStore/OCSFolderManager.m @@ -219,6 +219,11 @@ static const char *OCSPathColumnPattern = "c_path%i"; quickLocation = [locationString isNotNull] ? [NSURL URLWithString:locationString] : nil; + + if (quickLocation == nil) { + [self logWithFormat:@"WARNING(%s): missing quick location in record: %@", + __PRETTY_FUNCTION__, _record]; + } folder = [[OCSFolder alloc] initWithPath:path primaryKey:folderId folderTypeName:folderTypeName @@ -502,8 +507,10 @@ static const char *OCSPathColumnPattern = "c_path%i"; sql = [NSMutableString stringWithCapacity:256]; [sql appendString:@"SELECT "]; - [sql appendString: - @"\"c_folder_id\", \"c_path\", \"c_location\", \"c_folder_type\""]; + [sql appendString:@"\"c_folder_id\", "]; + [sql appendString:@"\"c_path\", "]; + [sql appendString:@"\"c_location\", \"c_quick_location\", "]; + [sql appendString:@"\"c_folder_type\""]; [sql appendString:@" FROM "]; [sql appendString:[self folderInfoTableName]]; [sql appendString:@" WHERE "]; @@ -548,7 +555,7 @@ static const char *OCSPathColumnPattern = "c_path%i"; userInfo:nil]; } - [self logWithFormat:@"create folder of type: %@", _type]; + [self logWithFormat:@"create folder of type: %@", ftype]; return [NSException exceptionWithName:@"NotYetImplemented" reason:@"no money, no time, ..." diff --git a/OGoContentStore/ocs_ls.m b/OGoContentStore/ocs_ls.m index 47706d29..c1698af7 100644 --- a/OGoContentStore/ocs_ls.m +++ b/OGoContentStore/ocs_ls.m @@ -63,8 +63,10 @@ folder = [self->folderManager folderAtPath:_path]; NSLog(@"folder: %@", folder); - NSLog(@" can%s connect store.", [folder canConnectStore] ? "" : "not"); - NSLog(@" can%s connect quick.", [folder canConnectQuick] ? "" : "not"); + NSLog(@" can%s connect store: %@", [folder canConnectStore] ? "" : "not", + [[folder location] absoluteString]); + NSLog(@" can%s connect quick: %@", [folder canConnectQuick] ? "" : "not", + [[folder quickLocation] absoluteString]); return 0; } diff --git a/OGoContentStore/sql/appointment-create.psql b/OGoContentStore/sql/appointment-create.psql index 0a0459dc..b5352035 100644 --- a/OGoContentStore/sql/appointment-create.psql +++ b/OGoContentStore/sql/appointment-create.psql @@ -1,9 +1,21 @@ -CREATE TABLE %s ( - pkey INTEGER - NOT NULL - PRIMARY KEY, +-- $Id$ +-- +-- (C) 2004 SKYRIX Software AG +-- + +CREATE TABLE %s_quick ( + c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename + uid VARCHAR(256) NOT NULL, startdate INT NOT NULL, enddate INT NOT NULL, - title VARCHAR(1000) NOT NULL, + title VARCHAR(1000) NOT NULL, participants VARCHAR(100000) NOT NULL ); + +CREATE TABLE %s_blob ( + c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename + c_content VARCHAR(100000) NOT NULL, -- the BLOB + c_creationdate INT NOT NULL, -- creation date + c_lastmodified INT NOT NULL, -- last modification (UPDATE) + c_version INT NOT NULL, -- version counter +); -- 2.39.5