An open API service indexing awesome lists of open source software.

https://github.com/felixklauke/prophecy

A little SQL connection pool capable of creating a datasource and improving your database access speed.
https://github.com/felixklauke/prophecy

connection connection-pool core database datasource java mysql pool prophecy sasuke sasukekawaii sql

Last synced: 7 days ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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](https://travis-ci.org/FelixKlauke/prophecy.svg?branch=master)](https://travis-ci.org/FelixKlauke/prophecy) |
| Development | [![Build Status](https://travis-ci.org/FelixKlauke/prophecy.svg?branch=dev)](https://travis-ci.org/FelixKlauke/prophecy) |

# Installation / Usage

- Install [Maven](http://maven.apache.org/download.cgi)
- Clone this repo
- Instal: ```mvn clean install```

**Maven repositories**
```xml



klauke-enterprises-maven-releases
Klauke Enterprises Maven Releases
https://repository.klauke-enterprises.com/repository/maven-releases/




klauke-enterprises-maven-snapshots
Klauke Enterprises Maven Snapshots
https://repository.klauke-enterprises.com/repository/maven-snapshots/

```

**Maven dependencies**

_Core:_
```xml

de.felixklauke.prophecy
prophecy-core
1.0.0

```

# Example

_Creation:_
```java
ProphecyConfig config = ProphecyConfig.newBuilder()
.setDatabaseURL("{URL}")
.setDatabaseUser("user")
.setDatabaseUserPassword("password")
.createProphecyConfig();

Prophecy prophecy = ProphecyFactory.createProphecy(config);
```

_Plain old usage:_
```java
Connection connection = prophecy.getConnection();

// Do whatever you want, query, update...

prophecy.checkInConnection(connection);
```

_Using AutoCloseable:_
```java
try (Connection connection = prophecy.getConnection()){
// Do whatever you want
} catch (SQLException e) {
e.printStackTrace();
}
```

_We also support Datasources:_
```java
DataSource dataSource = prophecy.createDatasource();
```