https://github.com/guidofaecke/jsondbquery
SQL builder
https://github.com/guidofaecke/jsondbquery
doctrine2 json php php-library rest sql zend-framework zf2 zf3
Last synced: about 1 month ago
JSON representation
SQL builder
- Host: GitHub
- URL: https://github.com/guidofaecke/jsondbquery
- Owner: guidofaecke
- License: bsd-3-clause
- Created: 2018-04-29T18:50:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T15:33:48.000Z (almost 8 years ago)
- Last Synced: 2024-05-10T06:21:20.328Z (almost 2 years ago)
- Topics: doctrine2, json, php, php-library, rest, sql, zend-framework, zf2, zf3
- Language: PHP
- Size: 124 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JsonDbQuery
[](https://travis-ci.org/guidofaecke/jsonDbQuery)
Build simple queries with JSON via REST and RPC calls.
Planned support
- Doctrine
- Zend-Db
- raw SQL
## Usage examples
### (not yet finalized)
http:///api/get_some_data?query={"field" : {"$not" : val}}
http:///api/get_some_data?query={"field" : {"$in" : [value1, value2, ...]}}
http:///api/get_some_data?query={"$or": [{"status": "BLUE"}, {"status": "RED"}]}
http:///api/get_some_data?query={"amount": {"$gt": 500}}
http:///api/get_some_data?query={"amount": {"$lte": 500}}
http:///api/get_some_data?query={"amount": {"$bt": [300, 640]}}