From faa263a9604c9ddf76869ee8f73c4e47c1922b30 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 20 Feb 2020 22:35:22 +0000 Subject: [PATCH] --- devdocs/specs/core-list-graph-datatable-filter-sort.txt | 4 ++-- docs/8.0/ayanova/docs/api-request-format.md | 2 +- server/AyaNova/DataList/DataListFilterSpecialTokens.cs | 2 +- server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devdocs/specs/core-list-graph-datatable-filter-sort.txt b/devdocs/specs/core-list-graph-datatable-filter-sort.txt index 13d490a0..7c3a1729 100644 --- a/devdocs/specs/core-list-graph-datatable-filter-sort.txt +++ b/devdocs/specs/core-list-graph-datatable-filter-sort.txt @@ -92,7 +92,7 @@ TAGS - At server if equality compare value is an array of strings then it's assu Also relative date filters are supported and their implementation is entirely a CLIENT responsibility as it touches on Locale issues: -public const string Null = "{[null]}"; +public const string Null = "*NULL*"; // public const string Yesterday = "{[yesterday]}"; // public const string Today = "{[today]}"; // public const string Tomorrow = "{[tomorrow]}"; @@ -172,7 +172,7 @@ Filters are saved to the database: - value = string version of direct comparison value or could be a special token meaning more - Never an empty string, empty string is invalid value - All Tokens are a value surrounded by this fragment: "{[XXX]}" where XXX is the token - - if empty or null then will be a token "{[null]}" + - if empty or null then will be a token "*NULL*" - If string then a string fragment, case is sensitive - If date then iso style date //RAVEN NOTE: it is my intention that dates come in iso8601 UTC format from the client - could be whole number or decimal number diff --git a/docs/8.0/ayanova/docs/api-request-format.md b/docs/8.0/ayanova/docs/api-request-format.md index 35809fae..8fda8110 100644 --- a/docs/8.0/ayanova/docs/api-request-format.md +++ b/docs/8.0/ayanova/docs/api-request-format.md @@ -90,7 +90,7 @@ Note that not all op values are valid for all data types, for example a date doe The `value` property is usually a direct comparison type value such as a date or string or numeric value, however it can also be a special token that is substituted at the moment the list is fetched. -In most cases tokens are for date ranges however there is one special token that applies to any data type `{[null]}`. When this token is specified as the `value` property value the list will be filtered by null (empty) values for all data types using the `op` comparison Equality operator `=` or in any other operator case it will be treated as if the operator was `!=` Not equal. +In most cases tokens are for date ranges however there is one special token that applies to any data type `*NULL*`. When this token is specified as the `value` property value the list will be filtered by null (empty) values for all data types using the `op` comparison Equality operator `=` or in any other operator case it will be treated as if the operator was `!=` Not equal. Tokens for date ranges generally provide a *relative* to the current moment (and time zone) pre-defined range of dates. This means the filter can be saved and re-used and the date range will always filter *relative* to the current date and time in the *user's own time zone* (as specified in their UserOptions object). So, for example, if two users are set to two different time zones they will get different results for some of these filters depending on whether that token is a relative one or absolute. diff --git a/server/AyaNova/DataList/DataListFilterSpecialTokens.cs b/server/AyaNova/DataList/DataListFilterSpecialTokens.cs index c9154158..cb810a0c 100644 --- a/server/AyaNova/DataList/DataListFilterSpecialTokens.cs +++ b/server/AyaNova/DataList/DataListFilterSpecialTokens.cs @@ -2,7 +2,7 @@ // { // public static class DataListFilterSpecialToken // { -// public const string Null = "{[null]}"; +// public const string Null = "*NULL*"; // public const string Yesterday = "{[yesterday]}"; // public const string Today = "{[today]}"; // public const string Tomorrow = "{[tomorrow]}"; diff --git a/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs b/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs index 8022bb16..200ce169 100644 --- a/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs +++ b/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs @@ -168,7 +168,7 @@ namespace AyaNova.DataList sb.Append(" "); //handle null values separately - if (!TagFilter && sValue == "{[null]}") + if (!TagFilter && sValue == "*NULL*") { switch (DataType) {