Skip to content

uwburn/jpa-json-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.