Skip to content

Commit 0696cbe

Browse files
committed
update readme
1 parent fa14e03 commit 0696cbe

File tree

1 file changed

+67
-52
lines changed

1 file changed

+67
-52
lines changed

README.md

Lines changed: 67 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ Hey due, please help me out for daily improve this project
88

99
[![Beerpay](https://beerpay.io/nahid/jsonq/badge.svg)](https://beerpay.io/nahid/jsonq)
1010

11+
12+
13+
## NOTE
14+
15+
> From the version JsonQ 6.0 all the features rewrite from [QAarray](https://github.com/nahid/qarray). After a long run we noticed that Query Engine of JsonQ should be seperate. Becouse people want to query over various types of data like CSV, YAML, XML. So if we keep the query engine tightly coupled with this project its make no sense. Thats why we move the Query Engine part and develop a new package [QAarray](https://github.com/nahid/qarray). Qarray is designed for queryng over native PHP array and anyone can implement their own Engine, like JsonQ.
16+
17+
18+
19+
>
20+
>
21+
> ### Please do not update to >= 6.0 version directly from bellow
22+
23+
24+
1125
## Installation
1226

1327
```
@@ -42,33 +56,33 @@ Let's see a quick example:
4256
```json
4357
//data.json
4458
{
45-
"name": "products",
46-
"description": "Features product list",
47-
"vendor":{
48-
"name": "Computer Source BD",
49-
"email": "[email protected]",
50-
"website":"www.example.com"
51-
},
52-
"users":[
53-
{"id":1, "name":"Johura Akter Sumi", "location": "Barisal"},
54-
{"id":2, "name":"Mehedi Hasan Nahid", "location": "Barisal"},
55-
{"id":3, "name":"Ariful Islam", "location": "Barisal"},
56-
{"id":4, "name":"Suhel Ahmed", "location": "Sylhet"},
57-
{"id":5, "name":"Firoz Serniabat", "location": "Gournodi"},
58-
{"id":6, "name":"Musa Jewel", "location": "Barisal", "visits": [
59-
{"name": "Sylhet", "year": 2011},
60-
{"name": "Cox's Bazar", "year": 2012},
61-
{"name": "Bandarbar", "year": 2014}
62-
]}
63-
],
64-
"products": [
65-
{"id":1, "user_id": 2, "city": "bsl", "name":"iPhone", "cat":1, "price": 80000},
66-
{"id":2, "user_id": 2, "city": null, "name":"macbook pro", "cat": 2, "price": 150000},
67-
{"id":3, "user_id": 2, "city": "dhk", "name":"Redmi 3S Prime", "cat": 1, "price": 12000},
68-
{"id":4, "user_id": 1, "city": null, "name":"Redmi 4X", "cat":1, "price": 15000},
69-
{"id":5, "user_id": 1, "city": "bsl", "name":"macbook air", "cat": 2, "price": 110000},
70-
{"id":6, "user_id": 2, "city": null, "name":"macbook air 1", "cat": 2, "price": 81000}
71-
]
59+
"name": "products",
60+
"description": "Features product list",
61+
"vendor":{
62+
"name": "Computer Source BD",
63+
"email": "[email protected]",
64+
"website":"www.example.com"
65+
},
66+
"users":[
67+
{"id":1, "name":"Johura Akter Sumi", "location": "Barisal"},
68+
{"id":2, "name":"Mehedi Hasan Nahid", "location": "Barisal"},
69+
{"id":3, "name":"Ariful Islam", "location": "Barisal"},
70+
{"id":4, "name":"Suhel Ahmed", "location": "Sylhet"},
71+
{"id":5, "name":"Firoz Serniabat", "location": "Gournodi"},
72+
{"id":6, "name":"Musa Jewel", "location": "Barisal", "visits": [
73+
{"name": "Sylhet", "year": 2011},
74+
{"name": "Cox's Bazar", "year": 2012},
75+
{"name": "Bandarbar", "year": 2014}
76+
]}
77+
],
78+
"products": [
79+
{"id":1, "user_id": 2, "city": "bsl", "name":"iPhone", "cat":1, "price": 80000},
80+
{"id":2, "user_id": 2, "city": null, "name":"macbook pro", "cat": 2, "price": 150000},
81+
{"id":3, "user_id": 2, "city": "dhk", "name":"Redmi 3S Prime", "cat": 1, "price": 12000},
82+
{"id":4, "user_id": 1, "city": null, "name":"Redmi 4X", "cat":1, "price": 15000},
83+
{"id":5, "user_id": 1, "city": "bsl", "name":"macbook air", "cat": 2, "price": 110000},
84+
{"id":6, "user_id": 2, "city": null, "name":"macbook air 1", "cat": 2, "price": 81000}
85+
]
7286
}
7387
```
7488

@@ -250,31 +264,31 @@ This is an alias method of `from()` and will behave exactly like that. See examp
250264
* `val` -- value to be matched with. It can be a _int_, _string_, _bool_ or even _Function_ - depending on the `op`.
251265
* `op` -- operand to be used for matching. The following operands are available to use:
252266

253-
* `=` : For weak equality matching
254-
* `eq` : Same as `=`
255-
* `!=` : For weak not equality matching
256-
* `neq` : Same as `!=`
257-
* `==` : For strict equality matching
258-
* `seq` : Same as `==`
259-
* `!==` : For strict not equality matching
260-
* `sneq` : Same as `!==`
261-
* `>` : Check if value of given **key** in data is Greater than **val**
262-
* `gt` : Same as `>`
263-
* `<` : Check if value of given **key** in data is Less than **val**
264-
* `lt` : Same as `<`
265-
* `>=` : Check if value of given **key** in data is Greater than or Equal of **val**
266-
* `gte` : Same as `>=`
267-
* `<=` : Check if value of given **key** in data is Less than or Equal of **val**
268-
* `lte` : Same as `<=`
269-
* `null` : Check if the value of given **key** in data is **null** (`val` parameter in `where()` can be omitted for this `op`)
270-
* `notnull` : Check if the value of given **key** in data is **not null** (`val` parameter in `where()` can be omitted for this `op`)
271-
* `in` : Check if the value of given **key** in data is exists in given **val**. **val** should be a plain _Array_.
272-
* `notin` : Check if the value of given **key** in data is not exists in given **val**. **val** should be a plain _Array_.
273-
* `startswith` : Check if the value of given **key** in data starts with (has a prefix of) the given **val**. This would only works for _String_ type data.
274-
* `endswith` : Check if the value of given **key** in data ends with (has a suffix of) the given **val**. This would only works for _String_ type data.
275-
* `contains` : Check if the value of given **key** in data has a substring of given **val**. This would only works for _String_ type data.
276-
* `match` : Check if the value of given **key** in data has a Regular Expression match with the given **val**. The `val` parameter should be a **RegExp** for this `op`.
277-
* `macro` : It would try to match the value of given **key** in data executing the given `val`. The `val` parameter should be a **Function** for this `op`. This function should have a matching logic inside it and return **true** or **false** based on that.
267+
* `=` : For weak equality matching
268+
* `eq` : Same as `=`
269+
* `!=` : For weak not equality matching
270+
* `neq` : Same as `!=`
271+
* `==` : For strict equality matching
272+
* `seq` : Same as `==`
273+
* `!==` : For strict not equality matching
274+
* `sneq` : Same as `!==`
275+
* `>` : Check if value of given **key** in data is Greater than **val**
276+
* `gt` : Same as `>`
277+
* `<` : Check if value of given **key** in data is Less than **val**
278+
* `lt` : Same as `<`
279+
* `>=` : Check if value of given **key** in data is Greater than or Equal of **val**
280+
* `gte` : Same as `>=`
281+
* `<=` : Check if value of given **key** in data is Less than or Equal of **val**
282+
* `lte` : Same as `<=`
283+
* `null` : Check if the value of given **key** in data is **null** (`val` parameter in `where()` can be omitted for this `op`)
284+
* `notnull` : Check if the value of given **key** in data is **not null** (`val` parameter in `where()` can be omitted for this `op`)
285+
* `in` : Check if the value of given **key** in data is exists in given **val**. **val** should be a plain _Array_.
286+
* `notin` : Check if the value of given **key** in data is not exists in given **val**. **val** should be a plain _Array_.
287+
* `startswith` : Check if the value of given **key** in data starts with (has a prefix of) the given **val**. This would only works for _String_ type data.
288+
* `endswith` : Check if the value of given **key** in data ends with (has a suffix of) the given **val**. This would only works for _String_ type data.
289+
* `contains` : Check if the value of given **key** in data has a substring of given **val**. This would only works for _String_ type data.
290+
* `match` : Check if the value of given **key** in data has a Regular Expression match with the given **val**. The `val` parameter should be a **RegExp** for this `op`.
291+
* `macro` : It would try to match the value of given **key** in data executing the given `val`. The `val` parameter should be a **Function** for this `op`. This function should have a matching logic inside it and return **true** or **false** based on that.
278292

279293
**example:**
280294

@@ -603,6 +617,7 @@ This package has also different language support.
603617
- [Go JsonQ](https://github.com/thedevsaddam/gojsonq) developed by [Saddam H](https://github.com/thedevsaddam) - Upcoming
604618

605619
## Support on Beerpay
620+
606621
Hey dude! Help me out for a couple of :beers:!
607622

608623
[![Beerpay](https://beerpay.io/nahid/jsonq/badge.svg?style=beer-square)](https://beerpay.io/nahid/jsonq) [![Beerpay](https://beerpay.io/nahid/jsonq/make-wish.svg?style=flat-square)](https://beerpay.io/nahid/jsonq?focus=wish)

0 commit comments

Comments
 (0)