mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 04:24:21 +01:00
Implement JDBC so that DriverManager can detect limbo connection
This commit is contained in:
@@ -2,6 +2,9 @@ package org.github.tursodatabase;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||
@@ -20,4 +23,11 @@ class JDBCTest {
|
||||
LimboConnection connection = JDBC.createConnection("jdbc:limbo:" + fileUrl, new Properties());
|
||||
assertThat(connection).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void connection_can_be_retrieved_from_DriverManager() throws SQLException {
|
||||
JDBC jdbc = new JDBC();
|
||||
Connection connection = DriverManager.getConnection("jdbc:limbo:sample.db");
|
||||
assertThat(connection).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user