Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Hikaricp | 18,254 | 9,061 | 1,243 | 9 days ago | 100 | January 10, 2022 | 478 | apache-2.0 | Java | |
光 HikariCP・A solid, high-performance, JDBC connection pool at last. | ||||||||||
Schemacrawler | 1,411 | 48 | 31 | 6 days ago | 178 | June 19, 2022 | other | Java | ||
Free database schema discovery and comprehension tool | ||||||||||
Pgjdbc | 1,266 | 26,004 | 1,680 | 11 days ago | 159 | May 24, 2022 | 425 | bsd-2-clause | Java | |
Postgresql JDBC Driver | ||||||||||
Mssql Jdbc | 960 | 1,789 | 283 | 2 days ago | 167 | June 22, 2022 | 76 | mit | Java | |
The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity with SQL Server through the standard JDBC application program interfaces (APIs). | ||||||||||
Mysql Connector J | 747 | 152,731 | 3,033 | 2 months ago | 88 | March 08, 2022 | other | Java | ||
MySQL Connector/J | ||||||||||
Java.jdbc | 702 | 70 | 4 | 14 days ago | 71 | February 02, 2021 | epl-1.0 | Clojure | ||
JDBC from Clojure (formerly clojure.contrib.sql) | ||||||||||
Upsert | 644 | 56 | 4 | 2 years ago | 35 | December 19, 2019 | 26 | mit | Ruby | |
Upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates functions (UDF) for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE. | ||||||||||
Pgjdbc Ng | 552 | 60 | 11 | 8 months ago | 18 | May 25, 2021 | 46 | other | Java | |
A new JDBC driver for PostgreSQL aimed at supporting the advanced features of JDBC and Postgres | ||||||||||
Vertx Jooq | 356 | 2 | 2 | 9 months ago | 41 | August 25, 2022 | 33 | mit | Java | |
A jOOQ-CodeGenerator to create vertx-ified DAOs and POJOs. | ||||||||||
Rdbc | 303 | 2 years ago | 21 | apache-2.0 | Rust | |||||
Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers |
Acolyte is a JDBC driver designed for cases like mockup, testing, or any case you would like to be able to handle JDBC query by hand (or maybe that's only Chmeee's son on the Ringworld).
Persistence layer not only apply changes and retrieve raw data. It usually gathers those data from several sources (e.g. various queries), but also converts data types (e.g. integer to boolean) and maps it to structured information.
Automated testing about that is not trivial. Using test DB requires tools (scripts) to set up environment repeatly, for each time tests are executed.
Considering integration testing that's fine. It's different for unit testing.
Unit tests must be isolated from each others so each unit can be validated independently.
A unit test can alter database as executed. Thus tests coming after would have to cope with this altered environment, without asserting which one is runned first (no order assumption).
As tests can be runned in parallel while considering code accessing same data spaces. Without extra attention to isolation/transaction management, this can lead to tests conflicting between them.
With Acolyte, connection behaviour can be built, defining which statement is supported with which (query or update) result.
Each prepared connection can supports only queries and updates your code is interested in, and there is no need to simulate a whole data store structure/schema.
As soon as Acolyte connections don't rely on data store, statement executions are isolated without extra effort.
As a JDBC driver is provided you can simply update test configuration, so that Acolyte connections are resolved by persistence code without change throught standard mechanisms (JDBC URL, JNDI, ...).
It also makes simple testing of DB edge cases (e.g. unrecoverable/unexpected error). It's easy to throw an exception from Acolyte connection, so that it can be validated persistence code is properly handling such case.
You can also use Acolyte to fully benefit from data access abstraction, not only not having to wait persistence (DB) being setup to code accesses, but also not having to wait persistence to code tests for access code.
You can get a quick interactive tour of Acolyte, online at tour.acolyte.eu.org.
Acolyte is usable with any code relying on JDBC. It makes it available for any JVM language:
You can get connection defined by Acolyte using the well-known java.sql.DriverManager.getConnection(jdbcUrl)
(see connection management).
final String jdbcUrl = "jdbc:acolyte:anything-you-want?handler=my-unique-id";
StatementHandler handler = new CompositeHandler().
withQueryDetection("^SELECT "). // regex test from beginning
withQueryDetection("EXEC that_proc"). // second detection regex
withUpdateHandler(new CompositeHandler.UpdateHandler() {
// Handle execution of update statement (not query)
public UpdateResult apply(String sql, List<Parameter> parameters) {
// ...
}
}).withQueryHandler(new CompositeHandler.QueryHandler () {
public QueryResult apply(String sql, List<Parameter> parameters) {
// ...
}
});
// Register prepared handler with expected ID 'my-unique-id'
acolyte.jdbc.Driver.register("my-unique-id", handler);
// then when existing code do ...
Connection con = DriverManager.getConnection(jdbcUrl);
// ... Connection |con| is managed through Acolyte |handler|
You can use Acolyte with various JVM test and persistence frameworks (see Integration guide).
With Studio, you can use data extracted from existing database with Acolyte handler.
Projects using Acolyte:
To share questions, answers & ideas, you can go to the mailing list.