diff options
Diffstat (limited to 'Source/SPTableCopy.h')
-rw-r--r-- | Source/SPTableCopy.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPTableCopy.h b/Source/SPTableCopy.h index 32eadcfc..56e1da8c 100644 --- a/Source/SPTableCopy.h +++ b/Source/SPTableCopy.h @@ -35,6 +35,7 @@ * @param name name of the table in the source database * @param sourceDB name of the source database * @param targetDB name of the target database + * @return YES on success, NO on any kind of error (unspecified) */ - (BOOL)copyTable:(NSString *)name from: (NSString *)sourceDB to: (NSString *)targetDB; @@ -54,7 +55,21 @@ * @param sourceDB name of the source database * @param targetDB name of the target database * @param copyWithContent whether to copy the content too, otherwise only structure + * @return YES on success, NO on any kind of error (unspecified) */ - (BOOL)copyTable:(NSString *)tableName from: (NSString *)sourceDB to: (NSString *)targetDB withContent:(BOOL)copyWithContent; +/** + * This method copies a bunch of tables including their data from one db to another. + * + * @param tableArray array of NSStrings with the table names in the sourceDB + * @param sourceDB name of the source database + * @param targetDB name of the target database + * @param copyWithContent whether to copy the content too, otherwise only structure + * @return YES on success, NO on any kind of error (unspecified) + * + * This method is able to copy InnoDB tables with foreign key constraints. + */ +- (BOOL)copyTables:(NSArray *)tablesArray from:(NSString *)sourceDB to:(NSString *)targetDB withContent:(BOOL)copyWithContent; + @end |