https://github.com/si3nloong/go-rsql
Golang RESTful Query Language
https://github.com/si3nloong/go-rsql
go-rsql restful rsql
Last synced: 4 months ago
JSON representation
Golang RESTful Query Language
- Host: GitHub
- URL: https://github.com/si3nloong/go-rsql
- Owner: si3nloong
- License: mit
- Created: 2020-01-08T06:37:42.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-05-19T21:58:00.000Z (over 2 years ago)
- Last Synced: 2025-03-26T05:33:20.800Z (7 months ago)
- Topics: go-rsql, restful, rsql
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go RSQL
## 🔨 Installation
```console
go get github.com/si3nloong/go-rsql
``````go
type QueryParams struct {
Name string `rsql:"n,filter,sort,allow=eq|gt|gte"`
Status string `rsql:"status,filter"`
PtrStr *string `rsql:"text,filter"`
No int `rsql:"no,column=No2,filter"`
}func main() {
p := MustNew(i)params, err := p.ParseQuery(`filter=status=eq="111";no=gt=1991;text==null&sort=status,-no`)
if err != nil {
panic(err)
}log.Println(params.Filters)
log.Println(params.Sorts)
}
```## 📄 License
[MIT](https://github.com/si3nloong/go-rsql/blob/master/LICENSE)
Copyright (c) 2020-present, SianLoong Lee