mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
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:
@@ -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
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
|
||||
@interface EOAdaptorChannel(GCS)
|
||||
|
||||
- (BOOL)tableExistsWithName:(NSString *)_tableName;
|
||||
- (BOOL) tableExistsWithName: (NSString *) _tableName;
|
||||
- (void) dropTables: (NSArray *) tableNames;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user