Representational State Transfer + Structured Query Language(RSQL): Demo application using RSQL parser to filter records based on provided condition(s)

Overview

Representational State Transfer + Structured Query Language: RSQL

Demo application using RSQL parser to filter records based on provided condition(s)

A Single GET API is all that is needed to be exposed per Entity class.

Additional Datatypes added/supported

  • UUID
  • LocalDate
  • LocalDateTime
  • Enum
  • Boolean String (true, false) and Bit (1,0)
  • Nested Objects

Additional Operations added/supported

  • equalIgnoreCase (=eic=)
  • notEqualIgnoreCase (=neic=)

Sample Recording showing examples

RSQL-Sample-Examples.mov

Pagination and Sorting Support

  • Pagination

    • Query parameters to include
      • count : maximum elements to be returned in a page
      • page : starts with 1, if value provided is <=0, first page is returned and if value>totalPages, the last page is returned
    • Sample path
    http:localhost:8080/wizards?query=gender==female&count=5&page=1
    
    • Sample Response
      {
      "currentPage": 1,
      "totalPages": 2,
      "count": 5,
      "result": [
          {
              "id": 2,
              "fullName": "Hermione Granger",
              "species": "HUMAN",
              "gender": "FEMALE",
              "house": {
                  "id": 1,
                  "name": "Gryffindor"
              },
              "dateOfBirth": "1979-09-19",
              "eyeColor": "brown",
              "hairColor": "brown",
              "wand": {
                  "id": 2,
                  "wood": "vine",
                  "core": "dragon heartstring",
                  "length": null
              },
              "patronus": null,
              "isProfessor": false,
              "alive": true,
              "imageUrl": "http://hp-api.herokuapp.com/images/hermione.jpeg"
          } ... and 4 more
      ]
    }
    
  • Sorting

    • Query parameter to be included

      • sort
    • Operators

      • Ascending: @
      • Descending: $
    • Examples:

      • to sort with fullName descending
      &sort="$descending"
      
      • to sort with dateOfBirth ascending
      &sort="@dateOfBirth"
      
      • to sort with ascending dateOfBirth and fullname descending
      &sort="@dateOfBirth$fullname"
      

SQL Injection Attack Prevention Support

SQL-Injection-prevention-rsql.mov

Important Classes and packages

References


⭐️ Star the repository to show support

🀝 PRs welcome

You might also like...

Data extraction from smartphones and GPS and Accelerometer data "fusion" with Kalman filter.

 Data extraction from smartphones and GPS and Accelerometer data

This is library for GPS and Accelerometer data "fusion" with Kalman filter. All code is written in Java. It helps to increase position accuracy and GP

Nov 22, 2022

Jamal is a macro language (JAmal MAcro Language)

Jamal is a macro language (JAmal MAcro Language)

Jamal Macro Language Jamal is a complex text processor with a wide variety of possible use. The first version of Jamal was developed 20 years ago in P

Dec 20, 2022

For Jack language. Most of codes were commented with their usage, which can be useful for beginner to realize the running principle of a compiler for object-oriented programming language.

Instructions: Download the Java source codes Store these codes into a local folder and open this folder Click the right key of mouse and click β€˜Open i

Jan 5, 2023

An examples of creating test records in the database with Spring Boot + Spring Data + JPA usage.

Spring Boot + JPA β€” Clear Tests An examples of creating test records in the database with Spring Boot + Spring Data + JPA usage. Check out the article

Nov 24, 2022

Record builder generator for Java records

RecordBuilder What is RecordBuilder Java 16 introduces Records. While this version of records is fantastic, it's currently missing some important feat

Dec 27, 2022

RR4J is a tool that records java execution and later allows developers to replay locally.

RR4J is a tool that records java execution and later allows developers to replay locally.

RR4J [Record Replay 4 Java] RR4J is a tool that records java execution and later allows developers to replay locally. The tool solves one of the chall

Dec 7, 2022

πŸ’Ύ Simple persisted state in react-native

React Native Use Persisted State Preview Introduce πŸ’Ύ Simple persisted state in react-native 🌏 Globally accessable like redux, recoil... πŸš€ No loadin

Aug 28, 2022

Executable state charts, workflows and more.

Executable state charts, workflows and more.

Act Getting started If you are using Maven, include the following in your POM: dependency groupIdorg.requirementsascode.act/groupId a

Dec 30, 2022

Sync DND state between Android phone and watch

Sync DND state between Android phone and watch

DNDSync This App was developed to enable Do Not Disturb (DND) synchronization between my Pixel phone and the Galaxy Watch 4 since this option was only

Dec 19, 2022
Owner
Hardik Singh Behl
Java Web Developer
Hardik Singh Behl
Allows you to use the MongoDB query syntax to query your relational database.

Spring Data JPA MongoDB Expressions How it works: Customize JPA Repository base class: @SpringBootApplication @EnableJpaRepositories(repositoryBaseCla

Muhammad Hewedy 86 Dec 27, 2022
Spring JPA @Query for custom query in Spring Boot example

Spring JPA @Query example (Custom query) in Spring Boot Use Spring JPA @Query for custom query in Spring Boot example: Way to use JPQL (Java Persisten

null 17 Dec 3, 2022
lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game resources!

lazy-language-loader lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game re

Shalom Ademuwagun 7 Sep 7, 2022
The Apache Software Foundation 605 Dec 30, 2022
Spring Boot DTO Example Tutorial | Data Transfer Object Pattern

springboot-dto-tutorial Spring Boot DTO Example Tutorial | Data Transfer Object Pattern at https://youtu.be/THv-TI1ZNMk Spring Boot DTO Tutorial - Ent

Ramesh Fadatare 20 Nov 16, 2022
Community extension to generate a Java client from the provided Camunda 7 OpenAPI descitpion and also warp it into Spring Boot

Camunda Engine OpenAPI REST Client Java and Spring Boot This community extension is a convenience wrapper around the generated Java client from the Ca

Camunda Community Hub 29 Dec 28, 2022
A near-real-time Mesh Join Algorithm Implementation provided with a Complete Data warehouse for METRO

Mesh Join Algorithm and Data Warehouse A complete Mesh-Join Algorithm Implementation as provided in the paper R-MESHJOIN . This is demonstrated by the

null 3 Aug 11, 2022
Imports waypoints from DCS F10 map into the plane navigation system, like a Data Transfer Cartidge.

DCSTheWay Imports waypoints from DCS F10 map into the plane navigation system, like a Data Transfer Cartridge. Special thanks to kukiric for helping o

Aaron Daniel 85 Dec 27, 2022
Alibaba Cloud Dedicated KMS Transfer SDK for Java can help Java developers to migrate from the KMS keys to the Dedicated KMS keys.

Alibaba Cloud Dedicated KMS Transfer SDK for Java Alibaba Cloud Dedicated KMS Transfer SDK for Java can help Java developers to migrate from the KMS k

Alibaba Cloud 3 May 12, 2022
The VAST ad sample code provided by HUAWEI Ads Kit describes how to display linear ads by integrating the HUAWEI VAST SDK into your app.

HMS Ads Demo for VAST English | δΈ­ζ–‡ Table of Contents Introduction Installation Configuration Supported Environments Sample Code Result License Introdu

HMS 11 Jul 16, 2022