SQL and Key Value usage in C++

classic Classic list List threaded Threaded
2 messages Options
Wolfgang Meyerle Wolfgang Meyerle
Reply | Threaded
Open this post in threaded view
|

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
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: SQL and Key Value usage in C++

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 <[hidden email]>:
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