It's pretty simple. In the top API, they'll call method like read(String sql, 
List<Object> parameters), then I'll use Ignite to read from the cache or db(if 
not hit).
The thing is, every time the sql provide could be different.
So how could I make a CacheStore to accept different sql dynamically?
Or, in which context should I save the sql so that I can pick it out in 
CacheStore?



At 2015-10-24 07:59:14, "Dmitriy Setrakyan" <[email protected]> wrote:

I don’t think I understand the use case. Can you please explain the sequence of 
API calls you plan to make and the desired effect?



On Fri, Oct 23, 2015 at 2:32 AM, Edison <[email protected]> wrote:



Actually, I'm trying to implement SQL ACID function. 
For the top user, they only need to provide the table and sql.
Then, in a common interface, I'll make the the adapter to accept the sql and do 
the real ACID operation on the cache as well as database.
Thus, the sql to run from the top user could be different every time. 



At 2015-10-23 15:57:51, "Dmitriy Setrakyan" <[email protected]> wrote:

I am a bit confused with the question. In the subject it says “load cache”, but 
in the body it says “query cache”.


If the question is about “loading cache", then, as Sergi suggested, you need to 
implement your own CacheStore. You can take any of the cache stores already 
provided and adapt them for your needs. More on CacheStore here: 
https://apacheignite.readme.io/docs/persistent-store


If the question is about “querying cache” in memory, then you can create SQL 
queries dynamically on the fly and execute them over Ignite data grid. More on 
SQL here: https://apacheignite.readme.io/docs/sql-queries


D.


On Thu, Oct 22, 2015 at 11:40 PM, Edison <[email protected]> wrote:

Hi,


Instead of given the SQL in EntryMapping, is it possible to use dynamic SQL to 
query the cache every time? 
If yes, how?


Thanks,




 







 


Reply via email to