mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-23 14:10:32 +00:00
Use GCSSpecialQueries in sogo-tool rename-user
Fixes #1924
The SQL syntax used by the former query would only work
with postgresql and Oracle.
(cherry picked from commit 378eef4082)
This commit is contained in:
committed by
Francis Lachapelle
parent
0b5aaa045a
commit
bee27444bc
@@ -110,6 +110,14 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) updateCPathInFolderInfo: (NSString *) tableName
|
||||
withCPath2: (NSString *) c_path2
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -205,6 +213,17 @@
|
||||
return types;
|
||||
}
|
||||
|
||||
- (NSString *) updateCPathInFolderInfo: (NSString *) tableName
|
||||
withCPath2: (NSString *) c_path2
|
||||
{
|
||||
static NSString *sqlFolderFormat
|
||||
= (@"UPDATE %@"
|
||||
@" SET c_path = '/'||c_path1||'/'||c_path2||'/'||c_path3||'/'||c_path4"
|
||||
@" WHERE c_path2 = '%@'");
|
||||
|
||||
return [NSString stringWithFormat: sqlFolderFormat, tableName, c_path2];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
//
|
||||
@@ -299,6 +318,17 @@
|
||||
return types;
|
||||
}
|
||||
|
||||
- (NSString *) updateCPathInFolderInfo: (NSString *) tableName
|
||||
withCPath2: (NSString *) c_path2
|
||||
{
|
||||
static NSString *sqlFolderFormat
|
||||
= (@"UPDATE %@"
|
||||
@" SET c_path = CONCAT('/', c_path1, '/', c_path2, '/', c_path3, '/', c_path4)"
|
||||
@" WHERE c_path2 = '%@'");
|
||||
|
||||
return [NSString stringWithFormat: sqlFolderFormat, tableName, c_path2];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
//
|
||||
@@ -392,4 +422,15 @@
|
||||
return types;
|
||||
}
|
||||
|
||||
- (NSString *) updateCPathInFolderInfo: (NSString *) tableName
|
||||
withCPath2: (NSString *) c_path2
|
||||
{
|
||||
static NSString *sqlFolderFormat
|
||||
= (@"UPDATE %@"
|
||||
@" SET c_path = '/'||c_path1||'/'||c_path2||'/'||c_path3||'/'||c_path4"
|
||||
@" WHERE c_path2 = '%@'");
|
||||
|
||||
return [NSString stringWithFormat: sqlFolderFormat, tableName, c_path2];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user