ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject Re: Using Json object to replace POJO
Date Tue, 13 Oct 2015 09:07:18 GMT
On Mon, Oct 12, 2015 at 8:41 PM, xeseo <xeseo@163.com> wrote:

> Thanks for reply.
> well, for better understanding, I'll take an example.
> Let's say I have a table in database, table A(C1,C2).
> What I'm trying to do is reading content from database with the below SQL:
> select C1 as empName, C2 as empScore from A
> , then mapping the result into a JSON object, e.g.
> {"empName":"Edison","empScore":90}, to return.
> And JSON string as result is also acceptable, not sure whether [1] is the
> same thing.
> [1] https://issues.apache.org/jira/browse/IGNITE-962
Yes, IGNITE-962 is the same thing. You will be able to run SQL over JSON
when this ticket is complete.

> dsetrakyan wrote
> > JSONObject is also just a Java object.
> Although JSON Object is also a Java POJO, but I don't think I can use
> CacheJdbcPojoStore directly for this purpose.
> What I'm currently doing is making a class which implements CacheStore,
> following the source of CacheAbstractJdbcStore to handle db connection,
> reading, write etc, and build JSON object to return.
> Not sure if this is the right way.

It is the right away.

> Meanwhile, it''ll be great if Ignite can provide such function by default.

I think we can consider it once the IGNITE-962 is implemented.

> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Using-Json-object-to-replace-POJO-tp1585p1597.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message