[
https://issues.apache.org/jira/browse/FINERACT-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Santa updated FINERACT-1910:
----------------------------------
Attachment: dataTableAdvancedFilteringExample.json
> Have advanced features for data table querying
> ----------------------------------------------
>
> Key: FINERACT-1910
> URL: https://issues.apache.org/jira/browse/FINERACT-1910
> Project: Apache Fineract
> Issue Type: New Feature
> Components: Data Tables
> Reporter: Peter Santa
> Priority: Critical
> Attachments: dataTableAdvancedFilteringExample.json
>
>
> h1. Background
> FINERACT-1747
> h1. Goal
> Have the querying possibilities - that have been developed with FINERACT-1747
> - extended with the following features:
> * pagination - similarly to several Fineract API endpoints
> * sorting based on given attribute
> * filter for closed interval (from, to) in case of the following typed fields
> ** date
> ** date and time
> ** number
> ** decimal
> * "LIKE" search in string and text fields - use wildcard
>
> h1. Solution Concept
> If multiple columns would be used as column filter, it is advisable not to
> put this number of query parameters in the url, but in the body. With this, a
> request would look like:
> h3. URL
> GET
> {{{}url{}}}/datatables/{{{}dataTableId{}}}/query?resultColumns=column3,column6,column4&offset=0&limit=10&sortOrder=desc&orderBy=transaction_date
> h3. Body
> {
> "columnFilters": [
> {
> "columnName1": {
> "from": 10,
> "to": 1000
> }
> },
> {
> "columnName2": {
> "equals": "The value equals to this string"
> }
> },
> {
> "columnName3": {
> "contains": "ue equa"
> }
> },
> { "aColumnThatContainDates1": {
> "gte": "2023-01-01", // including 01-01
> "lte": "2023-01-31", // including 01-31
> "dateFormat": "yyyy-MM-dd",
> "locale": "en" // if this makes any difference
> }
> },
> { "aColumnThatContainDates2": {
> "gt": "2023-01-01", // greater than, later than
> "lt": "2023-01-31", // less than, earlier than
> "dateFormat": "yyyy-MM-dd",
> "locale": "en" // if this makes any difference
> }
> },
> { "aColumnThatContainDates3": {
> "from": "2023-01-01", // including 01-01
> "dateFormat": "yyyy-MM-dd",
> "locale": "en" // if this makes any difference
> }
> },
> { "aColumnThatContainDateTime1": {
> "to": "2023-01-31 17:10:22.321", // including 01-31
> "dateFormat": "yyyy-MM-dd HH:mm:ss.SSS",
> "locale": "en" // if this makes any difference
> }
> }
> ]
> }
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)