Implement prepare

This commit is contained in:
김선우
2025-01-17 22:48:04 +09:00
parent b77bf879f7
commit 9765eaba52
6 changed files with 36 additions and 51 deletions

View File

@@ -1,6 +1,7 @@
package org.github.tursodatabase.jdbc4;
import org.github.tursodatabase.TestUtils;
import org.github.tursodatabase.core.LimboConnection;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -55,4 +56,12 @@ class JDBC4ConnectionTest {
connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, -1);
});
}
@Test
void prepare_simple_create_table() throws Exception {
String filePath = TestUtils.createTempFile();
String url = "jdbc:sqlite:" + filePath;
LimboConnection connection = new JDBC4Connection(url, filePath);
connection.prepare("CREATE TABLE users (id INT PRIMARY KEY, username TEXT)");
}
}