[go: up one dir, main page]

Skip to content

A little SQL connection pool capable of creating a datasource and improving your database access speed.

License

Notifications You must be signed in to change notification settings

felixklauke/prophecy

Repository files navigation

Prophecy

Prophecy is a simple java SQL Connection pool capable of having multiple connections to enhance database access speed by using more than one connection.

Build Status

Build Status
Master Build Status
Development Build Status

Installation / Usage

  • Install Maven
  • Clone this repo
  • Instal: mvn clean install

Maven repositories

<repositories>
    <!-- Klauke Enterprises Releases -->
    <repository>
        <id>klauke-enterprises-maven-releases</id>
        <name>Klauke Enterprises Maven Releases</name>
        <url>https://repository.klauke-enterprises.com/repository/maven-releases/</url>
    </repository>
	
    <!-- Klauke Enterprises Snapshots -->
    <repository>
        <id>klauke-enterprises-maven-snapshots</id>
        <name>Klauke Enterprises Maven Snapshots</name>
        <url>https://repository.klauke-enterprises.com/repository/maven-snapshots/</url>
    </repository>
</repositories>

Maven dependencies

Core:

<dependency>
    <groupId>de.felixklauke.prophecy</groupId>
    <artifactId>prophecy-core</artifactId>
    <version>1.0.0</version>
</dependency>

Example

Creation:

ProphecyConfig config = ProphecyConfig.newBuilder()
        .setDatabaseURL("{URL}")
        .setDatabaseUser("user")
        .setDatabaseUserPassword("password")
        .createProphecyConfig();
        
Prophecy prophecy = ProphecyFactory.createProphecy(config);

Plain old usage:

Connection connection = prophecy.getConnection();
        
// Do whatever you want, query, update...
        
prophecy.checkInConnection(connection);

Using AutoCloseable:

try (Connection connection = prophecy.getConnection()){
    // Do whatever you want
} catch (SQLException e) {
    e.printStackTrace();
}

We also support Datasources:

DataSource dataSource = prophecy.createDatasource();

About

A little SQL connection pool capable of creating a datasource and improving your database access speed.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages