You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Wolfgang Meyerle <wo...@googlemail.com> on 2020/11/13 12:56:24 UTC
SQL and Key Value usage in C++
Hi,
I have a question where I'm currently struggling to find the answer in
the Ignite Documentation and hopefully somebody of you can guide me in
the right direction.
According to the Ignite DDL Documentation of SQL I'm able upon Table
creation to provide a cache name and I have a keyname and valuename
property which I can set with for example:
CREATE TABLE Test (a double, b double, c double, res boolean, primary
key (a,b,c)) with "CACHE_NAME=Test, Key_type=FOO, Value_type=bar";
Can somebody example me for what purpose key_type and value_Type are
used for?
My intention is to use in code the key value cache principle in c++ and
later on for complex queries standard sql.
My hope is that the cpp key value based approach looks on the one hand
prettier in code than daft long sql statements and performs better.
Is anybody having experience in this matter?
How can I enable sql accessible table in Ignite by using the cpp api
without SQL statements?
How would I use this in code. Are there some samples available that I
can study?
Reagards,
Wolfgang
Re: SQL and Key Value usage in C++
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
The key_type and value_type are names of classes which may be put and get
in this cache once you configure serialization properly.
You can use INSERT/Put and SELECT/Get in any combinations.
Please see
https://ignite.apache.org/docs/latest/cpp-specific/cpp-serialization as an
example. You also need to switch to the simple name mapper for platform
interoperability (this is done in ignite.xml).
Regards,
--
Ilya Kasnacheev
пт, 13 нояб. 2020 г. в 15:57, Wolfgang Meyerle <
wolfgang.meyerle@googlemail.com>:
> Hi,
>
> I have a question where I'm currently struggling to find the answer in
> the Ignite Documentation and hopefully somebody of you can guide me in
> the right direction.
>
> According to the Ignite DDL Documentation of SQL I'm able upon Table
> creation to provide a cache name and I have a keyname and valuename
> property which I can set with for example:
>
> CREATE TABLE Test (a double, b double, c double, res boolean, primary
> key (a,b,c)) with "CACHE_NAME=Test, Key_type=FOO, Value_type=bar";
>
> Can somebody example me for what purpose key_type and value_Type are
> used for?
>
> My intention is to use in code the key value cache principle in c++ and
> later on for complex queries standard sql.
>
> My hope is that the cpp key value based approach looks on the one hand
> prettier in code than daft long sql statements and performs better.
>
> Is anybody having experience in this matter?
>
> How can I enable sql accessible table in Ignite by using the cpp api
> without SQL statements?
>
> How would I use this in code. Are there some samples available that I
> can study?
>
> Reagards,
>
> Wolfgang
>