Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sah4ez/exdb
https://github.com/sah4ez/exdb
database java8 jdbc
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sah4ez/exdb
- Owner: sah4ez
- License: gpl-3.0
- Created: 2016-12-28T18:09:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-26T10:41:21.000Z (over 7 years ago)
- Last Synced: 2023-06-30T23:03:52.372Z (over 1 year ago)
- Topics: database, java8, jdbc
- Language: Java
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
exdb
==========
[![Build Status](https://travis-ci.org/sah4ez/exdb.svg?branch=master)](https://travis-ci.org/sah4ez/exdb)
[![Coverage Status](https://coveralls.io/repos/github/sah4ez/exdb/badge.svg?branch=master)](https://coveralls.io/github/sah4ez/exdb?branch=master)
[![Code Climate](https://codeclimate.com/github/sah4ez/exdb/badges/gpa.svg)](https://codeclimate.com/github/sah4ez/exdb)### ABOUT ###
Maven dependency
```xml
com.github.sah4ez
exdb
1.0.2
```This is a library for safe extraction from database through the ResultSet.
##### Version #####
- 1.0.13
Implement AutoClosable for Prepared statement.- 1.0.3
Has issue with lost connection.##### Why user Extractor? #####
In Extractor realized simple and short API for extraction data from database.
You have this code:
```javapublic Integer getInt(String columnName) {
Integer i = 0;
try {
i = rs.getInt(columnName);
} catch (SQLException ignored) {
}
return i;
}
```
This code allow get int value, even if we have exception.So we create instance class with exception in Runtime.
### EXAMPLE ###
```java
public class Example{
//you load data from your DB in ResultSet and create instance of class used this ResultSet
private Integer id;
private String name;
private Float price;
private java.time.ZonedDateTime dateTime;
private final com.github.sah4ez.exdb.Extractor extractor;
public Example(java.sql.ResultSet resultSet){
extractor = new com.github.sah4ez.exdb.Extractor(resultSet);
this.id = extractor.getInt("id");
this.name = extractor.getString("name");
this.dateTime = extractor.getLocalDateTime("date");
this.price = extractor.getFloat("price");
}
}
```### License ###
## [**GPL**](http://www.gnu.org/licenses/gpl.txt) ##