Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 684 Bytes

README.md

File metadata and controls

32 lines (28 loc) · 684 Bytes

JPA JSON Search

Build JPA queries with JSON

JSON Example

{
	"filter": [
		{ "$or": [
		  { "sequence": { "$gt": 0 } },
		  { "sequence": { "$eq": -10 } }
		  { "sequence": { "$eq": -20 } },
		  { "$and": [
			{ "sequence": { "$gte": 50 } },
			{ "name": { "$eq": "John" } },
		  ]}
		]},
		{ "surname": { "$lk": "%son" } }
	],
	"page": 0,
	"pageSize": 10,
	"sort": [
		{ "sequence": "ASC" }
	]
}

Please note that the "root" filter element is implictly and AND container.

Credits

Thanks for the idea to Narmer23.

Thanks for the support to Narmer23 and sandrotaje.