Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Superset | 52,390 | 2 | 12 hours ago | 3 | April 29, 2022 | 1,348 | apache-2.0 | TypeScript | ||
Apache Superset is a Data Visualization and Data Exploration Platform | ||||||||||
Tidb | 34,190 | 68 | 101 | 8 hours ago | 1,289 | April 07, 2022 | 4,047 | apache-2.0 | Go | |
TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial | ||||||||||
Metabase | 32,693 | 11 hours ago | 1 | June 08, 2022 | 3,053 | other | Clojure | |||
The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum: | ||||||||||
Dbeaver | 32,336 | 18 hours ago | 1,765 | apache-2.0 | Java | |||||
Free universal database tool and SQL client | ||||||||||
Cockroach | 27,268 | 50 | 22 | 15 hours ago | 248 | August 06, 2021 | 6,614 | other | Go | |
CockroachDB - the open source, cloud-native distributed SQL database. | ||||||||||
Sqlmap | 27,229 | 4 days ago | 1 | February 27, 2018 | 58 | other | Python | |||
Automatic SQL injection and database takeover tool | ||||||||||
Directus | 21,846 | 50 | 21 hours ago | 55 | September 22, 2022 | 221 | other | TypeScript | ||
The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database. | ||||||||||
Tdengine | 21,432 | 1 | 10 hours ago | 12 | April 14, 2022 | 1,031 | agpl-3.0 | C | ||
TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps. | ||||||||||
Surrealdb | 20,756 | 13 hours ago | 35 | December 14, 2021 | 219 | other | Rust | |||
A scalable, distributed, collaborative, document-graph database, for the realtime web | ||||||||||
Postgrest | 20,635 | 4 | 3 days ago | 37 | July 12, 2022 | 209 | mit | Haskell | ||
REST API for any Postgres database |
jOOQ is an internal DSL and source code generator, modelling the SQL language as a type safe Java API to help you write better SQL.
Its main features include:
Secondary features include:
MULTISET
and ROW
nested collections and recordsjOOQ's main feature is typesafe, embedded SQL, allowing for IDE auto completion of SQL syntax...
... as well as of schema meta data:
This allows for preventing errors of various types, including typos of identifiers:
Or data type mismatches:
The examples are from the code generation blog post.
For many more examples, please have a look at the demo. A key example showing jOOQ's various strengths is from the MULTISET
operator announcement blog post:
Given these target DTOs:
record Actor(String firstName, String lastName) {}
record Film(
String title,
List<Actor> actors,
List<String> categories
) {}
You can now write the following query to fetch films, their nested actors and their nested categorise in a single, type safe query:
List<Film> result =
dsl.select(
FILM.TITLE,
multiset(
select(
FILM.actor().FIRST_NAME,
FILM.actor().LAST_NAME)
.from(FILM.actor())
).as("actors").convertFrom(r -> r.map(mapping(Actor::new))),
multiset(
select(FILM.category().NAME)
.from(FILM.category())
).as("categories").convertFrom(r -> r.map(Record1::value1))
)
.from(FILM)
.orderBy(FILM.TITLE)
.fetch(mapping(Film::new));
The query is completely type safe. Change a column type, name, or the target DTO, and it will stop compiling! Trust only your own eyes:
And here you see the nested result in action from the logs:
How does it work? Look at this annotated example:
List<Film> result =
dsl.select(
FILM.TITLE,
// MULTISET is a standard SQL operator that allows for nesting collections
// directly in SQL. It is either
// - supported natively
// - emulated using SQL/JSON or SQL/XML
multiset(
// Implicit path based joins allow for simpler navigation of foreign
// key relationships.
select(
FILM.actor().FIRST_NAME,
FILM.actor().LAST_NAME)
// Implicit correlation to outer queries allows for avoiding repetitive
// writing of predicates.
.from(FILM.actor())
// Ad-hoc conversion allows for mapping structural Record2<String, String>
// types to your custom DTO using constructor references
).as("actors").convertFrom(r -> r.map(mapping(Actor::new))),
multiset(
select(FILM.category().NAME)
.from(FILM.category())
).as("categories").convertFrom(r -> r.map(Record1::value1))
)
.from(FILM)
.orderBy(FILM.TITLE)
.fetch(mapping(Film::new));
The generated SQL query might look like this, in PostgreSQL:
select
film.title,
(
select coalesce(
jsonb_agg(jsonb_build_object(
'first_name', t.first_name,
'last_name', t.last_name
)),
jsonb_build_array()
)
from (
select
alias_78509018.first_name,
alias_78509018.last_name
from (
film_actor
join actor as alias_78509018
on film_actor.actor_id = alias_78509018.actor_id
)
where film_actor.film_id = film.film_id
) as t
) as actors,
(
select coalesce(
jsonb_agg(jsonb_build_object('name', t.name)),
jsonb_build_array()
)
from (
select alias_130639425.name
from (
film_category
join category as alias_130639425
on film_category.category_id = alias_130639425.category_id
)
where film_category.film_id = film.film_id
) as t
) as categories
from film
order by film.title
This particular example is explained more in detail in the MULTISET
operator announcement blog post. For many more examples, please have a look at the demo.