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.
- Host: GitHub
- URL: https://github.com/felixklauke/prophecy
- Owner: felixklauke
- License: mit
- Created: 2017-07-22T17:23:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T05:08:12.000Z (about 3 years ago)
- Last Synced: 2025-04-04T13:31:24.045Z (about 1 year ago)
- Topics: connection, connection-pool, core, database, datasource, java, mysql, pool, prophecy, sasuke, sasukekawaii, sql
- Language: Java
- Size: 57.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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 | [](https://travis-ci.org/FelixKlauke/prophecy) |
| Development | [](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();
```