Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glytching/tranquil
A Java query library using a SQL grammar
https://github.com/glytching/tranquil
antlr4 groovy java java8 json query-language sql-query
Last synced: 3 months ago
JSON representation
A Java query library using a SQL grammar
- Host: GitHub
- URL: https://github.com/glytching/tranquil
- Owner: glytching
- License: apache-2.0
- Created: 2018-09-08T08:18:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T15:14:13.000Z (over 1 year ago)
- Last Synced: 2023-08-06T09:21:49.555Z (over 1 year ago)
- Topics: antlr4, groovy, java, java8, json, query-language, sql-query
- Language: Java
- Size: 245 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Tranquil
========[![Build Status](https://circleci.com/gh/glytching/tranquil.svg?style=svg)](https://circleci.com/gh/glytching/tranquil) [![Coverage Status](https://coveralls.io/repos/github/glytching/tranquil/badge.svg?branch=master)](https://coveralls.io/github/glytching/tranquil?branch=master) [![Scrutinizer](https://img.shields.io/scrutinizer/g/glytching/tranquil.svg)](https://scrutinizer-ci.com/g/glytching/junit-extensions/) [![Javadoc](https://javadoc.io/badge2/io.github.glytching/tranquil/javadoc.svg)](https://javadoc.io/doc/io.github.glytching/tranquil) [![Maven Central](https://img.shields.io/maven-central/v/io.github.glytching/tranquil.svg)](http://repo1.maven.org/maven2/io/github/glytching/tranquil/1.0.0/) [![GitHub Release](https://img.shields.io/github/release/glytching/tranquil.svg)](https://github.com/glytching/tranquil/releases)
Tranquil is a Java library which provides a SQL-esque language for querying JSON and `Map`s.
Tranquil wraps a JSON de/serialization library and adds some predicate and projection capabilities. The inputs for these capabilities are expressed in SQL since many developers are likely to be familiar with using SQL to express `select` and `where` clauses.
That's quite a mouthful so have a quick look at the [simple example](https://github.com/glytching/tranquil/wiki/SimpleExample) for clarification.
Plenty more details [in the docs](https://github.com/glytching/tranquil/wiki).
### Examples
See the [docs](https://github.com/glytching/tranquil/wiki), specifically:
* [Simple](https://github.com/glytching/tranquil/wiki/SimpleExample)
* [Nested](https://github.com/glytching/tranquil/wiki/NestedExample)
* [Matching](https://github.com/glytching/tranquil/wiki/MatchingExample)
* [Transformation](https://github.com/glytching/tranquil/wiki/TransformationExample)
* [Bespoke Ouput Types](https://github.com/glytching/tranquil/wiki/BespokeOutputTypesExample)### Using Tranquil
The `tranquil` library is available on [Maven Central](http://search.maven.org/#artifactdetails%7Cio.github.glytching%7Ctranquil%7C1.0.0%7Cjar). Note: if using Tranquil as a test utility then use `test` or `testCompile`.
#### Maven
```
io.github.glytching
tranquil
1.0.0```
#### Gradle
```
compile 'io.github.glytching:tranquil:1.0.0'
```### Building Tranquil
```
$ git clone https://github.com/glytching/tranquil.git
$ cd tranquil
$ mvn clean install
```This will compile and run all automated tests and install the library in your local Maven repository.
Note: the code is formatted using the [Google Code Formatter](https://github.com/google/google-java-format).
### License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.