Add SQLite migration

This commit is contained in:
William committed 2022-08-29 13:07:34 +01:00
1 parent 70ed11fc65
commit dcc4fe68ff
5 files changed
+156 -10

No files matched your search

@@ -11,10 +11,12 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -167,6 +169,15 @@ public abstract class Database {
*/
public abstract boolean initialize();
/**
* Execute a MySQL script file read as an InputStream
*
* @param inputStream The input stream to read the script from
* @return A future returning void when complete
*/
public abstract CompletableFuture<Void> runScript(@NotNull InputStream inputStream,
@NotNull Map<String, String> replacements);
/**
* <b>(Internal use only)</b> - Sets a position to the position table in the database
*