All Projects → cchantep → acolyte

cchantep / acolyte

Licence: LGPL-2.1 license
🐯 Mockup/testing JDBC & MongoDB driver (or Chmeee's son on the Ringworld).

Programming Languages

scala
5932 projects
java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to acolyte

Lychee
The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.
Stars: ✭ 102 (+75.86%)
Mutual labels:  jdbc, persistence
Hibernate Springboot
Collection of best practices for Java persistence performance in Spring Boot applications
Stars: ✭ 589 (+915.52%)
Mutual labels:  jdbc, persistence
Requery
requery - modern SQL based query & persistence for Java / Kotlin / Android
Stars: ✭ 3,071 (+5194.83%)
Mutual labels:  jdbc, persistence
soda-for-java
SODA (Simple Oracle Document Access) for Java is an Oracle library for writing Java apps that work with JSON (and not only JSON!) in the Oracle Database. SODA allows your Java app to use the Oracle Database as a NoSQL document store.
Stars: ✭ 61 (+5.17%)
Mutual labels:  jdbc, persistence
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-79.31%)
Mutual labels:  jdbc
sqlite-jna
Java wrapper and Jdbc driver for SQLite using JNA or Bridj or JNR or JNI or JavaCPP.
Stars: ✭ 20 (-65.52%)
Mutual labels:  jdbc
linper
Linux Persistence Toolkit
Stars: ✭ 20 (-65.52%)
Mutual labels:  persistence
itstack-naive-chat-server
💞 《服务端》| 服务端同样使用Netty4.x作为socket的通信框架,同时在服务端使用Layui作为管理后台的页面,并且我们的服务端采用偏向于DDD领域驱动设计的方式与Netty集合,以此来达到我们的框架结构整洁干净易于扩展。同时我们的通信协议也是在服务端进行定义的,并对外提供可引入的Jar包,这样来保证客户端与服务端共同协议下进行通信。
Stars: ✭ 21 (-63.79%)
Mutual labels:  jdbc
PECI-Java-MAR-2015
Repositorio del curso de Java de Mar 2015
Stars: ✭ 29 (-50%)
Mutual labels:  jdbc
jnosql.github.io
The JNoSQL is a framework whose has the goal to help Java developers to create Java EE applications with NoSQL, whereby they can make scalable application beyond enjoy the polyglot persistence.
Stars: ✭ 13 (-77.59%)
Mutual labels:  jdbc
Persistence
Plugin para almacenar datos de forma persistente en Godot Engine 3
Stars: ✭ 20 (-65.52%)
Mutual labels:  persistence
Rebus.SqlServer
🚌 Microsoft SQL Server transport and persistence for Rebus
Stars: ✭ 35 (-39.66%)
Mutual labels:  persistence
spring-data-jdbc-repository
Spring Data JDBC generic DAO implementation in Java (more up-to-date fork)
Stars: ✭ 123 (+112.07%)
Mutual labels:  jdbc
android-room-example
Android Kotlin app showcasing the Room persistence library
Stars: ✭ 45 (-22.41%)
Mutual labels:  persistence
vue-auto-storage
🍻 An automatic storage plugin for Vue2, persist the data with localStorage.
Stars: ✭ 84 (+44.83%)
Mutual labels:  persistence
device-mockups
No longer mirroring this repo with .org
Stars: ✭ 27 (-53.45%)
Mutual labels:  mockup
mydataharbor
🇨🇳 MyDataHarbor是一个致力于解决任意数据源到任意数据源的分布式、高扩展性、高性能、事务级的数据同步中间件。帮助用户可靠、快速、稳定的对海量数据进行准实时增量同步或者定时全量同步,主要定位是为实时交易系统服务,亦可用于大数据的数据同步(ETL领域)。
Stars: ✭ 28 (-51.72%)
Mutual labels:  jdbc
warpdb
DSL-driven RDBMS interface for Java.
Stars: ✭ 73 (+25.86%)
Mutual labels:  jdbc
oracle-jdbc-tester
A simple command line Java application to test JDBC connection to Oracle database
Stars: ✭ 37 (-36.21%)
Mutual labels:  jdbc
tekniq
A framework designed around Kotlin providing Restful HTTP Client, JDBC DSL, Loading Cache, Configurations, Validations, and more
Stars: ✭ 31 (-46.55%)
Mutual labels:  jdbc

Acolyte

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).

Motivation

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.

Usage

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.

Requirements

  • Java 1.6+

Limitations

  • Limited datatype conversions.
  • Binary datatype are not currently supported.
  • Pseudo-support for transaction.
  • Currency types.

Related applications

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].