Skip to content

Commit c4a7bce

Browse files
committed
Revert "Disable restore / backup statements (dirty way) Willena#23"
Cause many things to fail... This reverts commit da07de6
1 parent cc61d41 commit c4a7bce

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/org/sqlite/ExtendedCommand.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ public static SQLExtension parse(String sql) throws SQLException {
4040
if (sql == null)
4141
return null;
4242

43-
// if (sql.startsWith("backup"))
44-
// return BackupCommand.parse(sql);
45-
// else if (sql.startsWith("restore"))
46-
// return RestoreCommand.parse(sql);
43+
if (sql.startsWith("backup"))
44+
return BackupCommand.parse(sql);
45+
else if (sql.startsWith("restore"))
46+
return RestoreCommand.parse(sql);
4747

4848
return null;
4949
}
@@ -103,7 +103,7 @@ public static BackupCommand parse(String sql) throws SQLException {
103103
}
104104

105105
public void execute(DB db) throws SQLException {
106-
//db.backup(srcDB, destFile, null);
106+
db.backup(srcDB, destFile, null);
107107
}
108108

109109
}
@@ -149,7 +149,7 @@ public static RestoreCommand parse(String sql) throws SQLException {
149149
* @see org.sqlite.ExtendedCommand.SQLExtension#execute(org.sqlite.core.DB)
150150
*/
151151
public void execute(DB db) throws SQLException {
152-
//db.restore(targetDB, srcFile, null);
152+
db.restore(targetDB, srcFile, null);
153153
}
154154
}
155155

src/test/java/org/sqlite/AllTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
ConnectionTest.class,
1212
DBMetaDataTest.class,
1313
ErrorMessageTest.class,
14-
//ExtendedCommandTest.class, //Backup / restore API is disabled
14+
ExtendedCommandTest.class,
1515
ExtensionTest.class,
1616
FetchSizeTest.class,
1717
InsertQueryTest.class,

0 commit comments

Comments
 (0)