https://github.com/mitranim/jel
[MOVED] "JSON Expession Language". Expresses a whitelisted subset of SQL with simple JSON structures.
https://github.com/mitranim/jel
Last synced: 11 months ago
JSON representation
[MOVED] "JSON Expession Language". Expresses a whitelisted subset of SQL with simple JSON structures.
- Host: GitHub
- URL: https://github.com/mitranim/jel
- Owner: mitranim
- License: unlicense
- Created: 2020-12-15T07:04:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T09:31:01.000Z (almost 3 years ago)
- Last Synced: 2025-02-24T06:44:38.676Z (11 months ago)
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
**Moved to https://github.com/mitranim/sqlb**. This repo is usable but frozen.
## Overview
"JSON Expession Language". Expresses a whitelisted subset of SQL with simple JSON structures. Transcodes JSON queries to SQL.
See the full documentation at https://godoc.org/github.com/mitranim/jel.
See the sibling library https://github.com/mitranim/sqlb for SQL query building.
## Changelog
### 0.3.0
Rename `Expr.Append` to `Expr.AppendTo` for consistency with other libraries. The repo is now frozen/moved. See https://github.com/mitranim/sqlb.
### 0.2.0
Update to match the recent breaking changes in the `sqlb` package.
### 0.1.3
Breaking: removed `Ord` after moving it to `sqlb`, which is a dependency of this package.
### 0.1.2
Minor breaking change: `Ord` now uses the `nulls last` qualifier. We might want to make this configurable in the future.
### 0.1.1
Added `Ords` for SQL `order by`.
The new type `Ords` represents an SQL `order by` clause in a structured fashion, and allows to safely decode it from client input. Just like `Expr`, decoding `Ords` is performed by consulting a user-specified struct type. JSON field names are converted to DB column names, unknown fields cause a parse error. When encoding for SQL, identifiers are quoted for safety.
Minor breaking change: renamed `ExprFrom` → `ExprFor`.
### 0.1.0
First tagged release.
## License
https://unlicense.org
## Misc
I'm receptive to suggestions. If this library _almost_ satisfies you but needs changes, open an issue or chat me up. Contacts: https://mitranim.com/#contacts