Giter VIP home page Giter VIP logo

jdbc_tests's Introduction

JDBC tests

Featuring various dbs such as :

  • Sqlite
  • postgres
  • MariaDb
  • MongoDb
  • Cassandra
  • H2 ...

Testing ORM such as Hibernate, manual JDBC, OpenJPA, EclipseLink...

Sqlite

Can run in memory or using file storage.

https://github.com/xerial/sqlite-jdbc

Directly load the DB from the code using the proper library which includes the server.

You may use SQLiteBrowser in order to get an interface to access the db.

H2 db

The console is enabled in the application.yml - you may access the db using the following url :

http://localhost:9090/h2

Check the settings for the proper port and uri.

Hibernate

We use both Annotation and Config files (hbm.xml) to map our classes to tables.

ehcache

Disable caching for proper debugging.

https://howtodoinjava.com/hibernate/hibernate-ehcache-configuration-tutorial/

HSQL

Hibernate's query language (HSQL), which is similar to SQL except that it refers to the objects in the code rather than the tables in the database

Patterns

Facade pattern

See the Persister - it s an example of the facade pattern. Ex : RepositoryPattern

  1. An interface definition that declares the persistence methods. This is usually a set of CRUD calls.
  2. A set of facade classes that implement the interface and hide (encapsulate) the complexity of persistence behind simple CRUD calls.
  3. A factory method (or injection) to select the appropriate persister for the application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.