Monotone-Parent: 5092b7192c90ae7b78ecc0442ac5ec1841d30a8d

Monotone-Revision: 644595c11e58a7c604c223b28fa3c197272777e2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-06-30T14:08:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-06-30 14:08:10 +00:00
parent 09a3866d02
commit 975f39355e
3 changed files with 23 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2008-06-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* EOAdaptorChannel+GCS.m ([EOAdaptorChannel
-dropTables:tableNames]): new method that drops a list of tables.
2008-06-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* GCSFolderManager.m ([GCSFolderManager

View File

@@ -33,7 +33,8 @@
@interface EOAdaptorChannel(GCS)
- (BOOL)tableExistsWithName:(NSString *)_tableName;
- (BOOL) tableExistsWithName: (NSString *) _tableName;
- (void) dropTables: (NSArray *) tableNames;
@end

View File

@@ -24,7 +24,8 @@
@implementation EOAdaptorChannel(GCS)
- (BOOL)tableExistsWithName:(NSString *)_tableName {
- (BOOL) tableExistsWithName: (NSString *) _tableName
{
NSException *ex;
NSString *sql;
BOOL didOpen;
@@ -47,4 +48,18 @@
return ex != nil ? NO : YES;
}
- (void) dropTables: (NSArray *) tableNames
{
unsigned int count, max;
NSString *sql;
max = [tableNames count];
for (count = 0; count < max; count++)
{
sql = [NSString stringWithFormat: @"DROP TABLE %@",
[tableNames objectAtIndex: count]];
[self evaluateExpressionX: sql];
}
}
@end /* EOAdaptorChannel(GCS) */