From 2821c05e971a9a2c0d0f84aefc39a534811a00e7 Mon Sep 17 00:00:00 2001 From: "pavlos.bountagkidis" Date: Wed, 10 Jul 2024 11:40:00 +0100 Subject: [PATCH 1/2] clarifications with ranges --- .../09_server_training/03_ssdt-day3.mdx | 4 ++-- docs/03_server/03_request-server/03_advanced.mdx | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/01_getting-started/09_server_training/03_ssdt-day3.mdx b/docs/01_getting-started/09_server_training/03_ssdt-day3.mdx index 1700f9c0ea..e9aa7a4aee 100644 --- a/docs/01_getting-started/09_server_training/03_ssdt-day3.mdx +++ b/docs/01_getting-started/09_server_training/03_ssdt-day3.mdx @@ -349,7 +349,7 @@ If timeout is not set for a given requestReply definition, the default value wil You can specify ranges from the client of the requestReply server by postfixing the request parameter names with _FROM and _TO. -The example below shows a client building a GenesisSet request based upon the requestReplies defined from the previous example. This example stipulates a price range between 1,000 and 10,000. Leaving out FROM will define a top-end range, leaving out TO will define a bottom-end range. +The example below shows a client building a GenesisSet request based upon the requestReplies defined from the previous example. This example stipulates a price range between 1,000 and 10,000. Both ends need to be provided. ```kotlin @@ -364,7 +364,7 @@ The example below shows a client building a GenesisSet request based upon the re sendRequest(request) // details of sending request hidden for brevity ``` -Note that ranges that are not based on indexes perform more slowly than those that are. +Note that ranges must be based on indexes. Post-fixing the request parameter targeting records without an index, will process the request ignoring the range. ### Custom Request Servers diff --git a/docs/03_server/03_request-server/03_advanced.mdx b/docs/03_server/03_request-server/03_advanced.mdx index 7f4e3c35b0..e8c39a8879 100644 --- a/docs/03_server/03_request-server/03_advanced.mdx +++ b/docs/03_server/03_request-server/03_advanced.mdx @@ -80,7 +80,9 @@ If timeout is not set for a given requestReply definition, the default value wil ## Ranges You can specify ranges from the client of the requestReply server by post-fixing the request parameter names with _FROM and _TO. The example below shows a client building a GenesisSet request based upon -the requestReplies defined from previous example. This example stipulates a price range between 1,000 and 10,000. Leaving out FROM will define a top-end range, leaving out TO will define a bottom-end range. +the requestReplies defined from previous example. This example stipulates a price range between 1,000 and 10,000. +Ranges can be used with numeric values and Date/Datetime values. +Both _FROM and _TO need to be specified to get a result. Specifying only one end, will result in an error. ```kotlin @@ -96,7 +98,11 @@ the requestReplies defined from previous example. This example stipulates a pric reply(request) ``` -Note that ranges that are not based on indexes perform more slowly than those that are. + +:::note +1. Ranges must be based on indexes. Post-fixing the request parameter targeting records without an index, will process the request ignoring the range. +2. It is not possible to get a range using unix timestamps when targeting a GenesisFlake field. The epoch time (millis) is in the most significant bits of the raw GenesisFlake value, so the user needs to shift once right to decode into epoch millis (GenesisFlake to Timestamp) and once left to do the same thing for encoding (Timestamp to GenesisFlake) as described [here](../../02_database/01_fields-tables-views/04_timestamps.mdx). +::: ## Permissioning From ebedf34c12487b4066bf920f73e69d6978a3eecc Mon Sep 17 00:00:00 2001 From: wjhendry <90383531+wjhendry@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:33:05 +0100 Subject: [PATCH 2/2] Update 03_advanced.mdx --- docs/03_server/03_request-server/03_advanced.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/03_server/03_request-server/03_advanced.mdx b/docs/03_server/03_request-server/03_advanced.mdx index e8c39a8879..140b0bc00d 100644 --- a/docs/03_server/03_request-server/03_advanced.mdx +++ b/docs/03_server/03_request-server/03_advanced.mdx @@ -82,7 +82,7 @@ If timeout is not set for a given requestReply definition, the default value wil You can specify ranges from the client of the requestReply server by post-fixing the request parameter names with _FROM and _TO. The example below shows a client building a GenesisSet request based upon the requestReplies defined from previous example. This example stipulates a price range between 1,000 and 10,000. Ranges can be used with numeric values and Date/Datetime values. -Both _FROM and _TO need to be specified to get a result. Specifying only one end, will result in an error. +You must specify both _FROM and _TO to get a result. Specifying only one end will result in an error. ```kotlin @@ -101,7 +101,7 @@ Both _FROM and _TO need to be specified to get a result. Specifying only one end :::note 1. Ranges must be based on indexes. Post-fixing the request parameter targeting records without an index, will process the request ignoring the range. -2. It is not possible to get a range using unix timestamps when targeting a GenesisFlake field. The epoch time (millis) is in the most significant bits of the raw GenesisFlake value, so the user needs to shift once right to decode into epoch millis (GenesisFlake to Timestamp) and once left to do the same thing for encoding (Timestamp to GenesisFlake) as described [here](../../02_database/01_fields-tables-views/04_timestamps.mdx). +2. It is not possible to get a range using unix timestamps when targeting a GenesisFlake field. The epoch time (millis) is in the most significant bits of the raw GenesisFlake value, so you need to shift once right to decode into epoch millis (GenesisFlake to Timestamp) and once left to do the same thing for encoding (Timestamp to GenesisFlake). This is described in opur page on [timestamps](/database/fields-tables-views/timestamps/). ::: ## Permissioning