>> PDX serialization and realize a method equivalent to toString() for each
class to be stored and its internal classes
In query, user can invoke a method on the object, e.g. map.toString()...Or
app developer can write a customized method that iterates over the
collection and build a string (based on application need) and return it...

Here gfh is going over the object and displaying the attributes from
them...Gfsh could add support to print the collection, but as Udo pointed
out, it becomes harder to display...

You could change your query to say:

Select id, templateEndpointProperties.toString() from /templates where
id=3149421226118643712L"

In this case you have to define all the projection fields.

-Anil.



On Thu, Aug 3, 2017 at 1:05 PM, Udo Kohlmeyer <[email protected]> wrote:

> Hi there Anton,
>
> This kind of change can quickly turn horrible, as a Map/Collection can in
> essence store anything. Which means, that having a plugin that
> pretty-prints any collection would potentially have to be recursive. At
> that point it becomes a question of how deep and when does one stop.. In
> addition to that, how does one best display it on a screen wrt columns and
> other values.
>
> Currently GEODE does not provide such a mechanism, and we (the GEODE
> community) would be most appreciative if you were to trial such an
> implementation and potentially submit a pull request.
>
> --Udo
>
> On 8/3/17 11:40, Anton Mironenko wrote:
>
> Hi Anil,
> Thanks, but to get all object details I have to perform many queries,
> especially if the object is complex.
> Is there any way to embed a plugin into Geode server or into PDX
> serialization and realize a method equivalent to toString() for each class
> to be stored and its internal classes, so that the output is in JSON or
> similar convenient format?
>
> Anton Mironenko
>
> 3 авг. 2017 г., в 21:04, Anilkumar Gingade <[email protected]>
> написал(а):
>
> You have to iterate over the collections (similar to join) to get the
> values stored in those collection.
>
> Querying nested collections:
> The following query uses Positions of type HashMap.
> SELECT p, pos FROM /exampleRegion p, p.positions.values pos WHERE
> pos.secId = 'VMW'
>
> You can find the object definition and more info at:
> http://gemfire.docs.pivotal.io/geode/getting_started/
> querying_quick_reference.html
>
> -Anil.
>
>
>
>
>
> On Thu, Aug 3, 2017 at 9:12 AM, Anton Mironenko <[email protected]>
> wrote:
>
>> Hello,
>>
>> Is there any way to see in gfsh the whole object stored under some key?
>>
>>
>>
>> Currently only primitive types are printed, but collections are not, only
>> the collection class name is printed instead (class java.util.ArrayList ,
>> class java.util.HashMap):
>>
>>
>>
>> gfsh>query --query="select * from /templates where
>> id=3149421226118643712L"
>>
>> Result     : true
>>
>> startCount : 0
>>
>> endCount   : 20
>>
>> Rows       : 1
>>
>>         id          | operatorId |     eventTypeId     | typeID |
>> language | channelTypeCode | roleCode | subjectTemplate | messageTemplate |
>> templateEndpointProperties | properties
>>
>> ------------------- | ---------- | ------------------- | ------ |
>> -------- | --------------- | -------- | --------------- | --------------- |
>> -------------------------- | -----------------------
>>
>> 3149421226118643712 | 0          | 3149421206701113344 | 6      |
>> 14       | 5               | 1        |                 |                 | 
>> class
>> java.util.ArrayList  | class java.util.HashMap
>>
>> NEXT_STEP_NAME : END
>>
>>
>>
>> Anton Mironenko
>>
>> Software Architect
>>
>> Amdocs ASP team
>>
>>
>> This message and the information contained herein is proprietary and
>> confidential and subject to the Amdocs policy statement,
>> you may review at https://www.amdocs.com/about/email-disclaimer
>>
>
> This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement,
> you may review at https://www.amdocs.com/about/email-disclaimer
>
>
>

Reply via email to