All Projects → bendem → Sql Streams

bendem / Sql Streams

Licence: mit
Painless low level jdbc abstraction using the java 8 stream api.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sql Streams

Node Sqlite
SQLite client for Node.js applications with SQL-based migrations API written in Typescript
Stars: ✭ 642 (+3676.47%)
Mutual labels:  sql, database
Baikaldb
BaikalDB, A Distributed HTAP Database.
Stars: ✭ 707 (+4058.82%)
Mutual labels:  sql, database
Godb
A Go SQL query builder and struct mapper.
Stars: ✭ 651 (+3729.41%)
Mutual labels:  sql, database
Beekeeper Studio
Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows.
Stars: ✭ 8,053 (+47270.59%)
Mutual labels:  sql, database
Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 7,712 (+45264.71%)
Mutual labels:  sql, database
Manticoresearch
Database for search
Stars: ✭ 610 (+3488.24%)
Mutual labels:  sql, database
Ray.aurasqlmodule
Aura.Sql module for Ray.Di
Stars: ✭ 5 (-70.59%)
Mutual labels:  sql, database
Go Sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
Stars: ✭ 539 (+3070.59%)
Mutual labels:  sql, database
Efcore.pg
Entity Framework Core provider for PostgreSQL
Stars: ✭ 838 (+4829.41%)
Mutual labels:  sql, database
Db Dumper
Dump the contents of a database
Stars: ✭ 744 (+4276.47%)
Mutual labels:  sql, database
Jailer
Database Subsetting and Relational Data Browsing Tool.
Stars: ✭ 576 (+3288.24%)
Mutual labels:  sql, database
Imdbpy
IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies
Stars: ✭ 792 (+4558.82%)
Mutual labels:  sql, database
Tiny tds
TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Stars: ✭ 575 (+3282.35%)
Mutual labels:  sql, database
Genji
Document-oriented, embedded SQL database
Stars: ✭ 636 (+3641.18%)
Mutual labels:  sql, database
Yugabyte Db
The high-performance distributed SQL database for global, internet-scale apps.
Stars: ✭ 5,890 (+34547.06%)
Mutual labels:  sql, database
Tidb
TiDB is an open source distributed HTAP database compatible with the MySQL protocol
Stars: ✭ 29,871 (+175611.76%)
Mutual labels:  sql, database
Firebird
Firebird server, client and tools
Stars: ✭ 522 (+2970.59%)
Mutual labels:  sql, database
Cosette
Cosette is an automated SQL solver.
Stars: ✭ 533 (+3035.29%)
Mutual labels:  sql, database
Nano Sql
Universal database layer for the client, server & mobile devices. It's like Lego for databases.
Stars: ✭ 717 (+4117.65%)
Mutual labels:  sql, database
Eralchemy
Entity Relation Diagrams generation tool
Stars: ✭ 767 (+4411.76%)
Mutual labels:  sql, database

sql-streams

Codeship Status for bendem/sql-streams

sql-streams is a tool for the people that don't need or want to use an ORM but don't want to deal with the JDBC API either. It provides a light abstraction over JDBC without ever making it inaccessible.

Features

  • Simple setup if you already have a Connection or a DataSource available
  • Fluent API
  • ResultSet is abstracted to a Stream
  • Classes that can be closed are AutoCloseable
  • SQLException are wrapped into UncheckedSqlException
  • Doesn't try to hide the JDBC primitives, they are never further than a method call away
  • Automatic type deduction with the with method

Getting started

To get started, all you need to do is to add sql-streams to your dependencies:

<dependency>
    <groupId>be.bendem</groupId>
    <artifactId>sql-streams</artifactId>
    <version>[current version]</version>
</dependency>
compile 'be.bendem:sql-streams:[current version]'

Once it is done, you can create an instance of Sql using one of the two connect methods.

try (Sql sql = Sql.connect(datasource)) {
    Optional<String> userEmail = sql
        .first("select email from users where user_id = ?")
        .with(userId);
}

If you are using spring-boot, checkout sql-streams-spring!

Development

You will need maven to compile and install this library

mvn install

In addition to the SQLite and H2 tests, you can run the tests with PostgreSQL by providing a jdbc connection url:

PGURL=jdbc:postgresql:test mvn test
# or with user and password if not using peer authentication
PGURL=jdbc:postgresql://localhost/test PGUSER=test PGPASSWORD=test mvn test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].