Hi Rick,
It looks fine.
BTW, on your first try your query string did not have "values (?, ?)". In
general for this case you have an option not to mention a columns.
Thanks,
Amir
On Fri, Mar 23, 2018, 3:28 AM wrote:
> Hi Amir,
>
>
>
> I tried the following java code, and
Hi Amir,
I tried the following java code, and it was successful.
PreparedStatement stmt = conn.prepareStatement("INSERT INTO
\"igniteCache\".STRING(_key, _val) VALUES(?, ?)");
stmt.setString(1,"keyInsert");
stmt.setString(2,"ValueInsert");
stmt.execute();
I do not know if this is the best way
Hi Amir
By the way,
if we would like to insert/update data to cache, do you have any idea to
achieve this?
PreparedStatement stmt = conn.prepareStatement("INSERT INTO
\"igniteCache\".STRING");
stmt.setString(1, "keyInsert");
stmt.setString(2, "valueInsert");
stmt.execute();
Error:
Hi Amir
I use the method recommended by you, and that works well.
My testing code is as:
ResultSet rs = conn.createStatement().executeQuery("select * from
\"igniteCache\".STRING");
while (rs.next()) {
String key = rs.getNString(1);
String value = rs.getString(2);
System.out.println("cacheData
Hi Rick,
In Ignite cache name is used as a database schema and a cache value type as
a table name. So, in your case you should execute
select * from "igniteCache".STRING to get your cache data.
I would recomend you to run your Ignite instance with
-DIGNITE_H2_DEBUG_CONSOLE=true parameter so you
Hi Andrey,
I tried to use JDBC client at
https://apacheignite-sql.readme.io/docs/jdbc-driver
The java code is as:
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1");
ResultSet rs =
Rick,
Java think client may be released in some nearest release.
You can track its progress here:
https://issues.apache.org/jira/browse/IGNITE-7421
Meanwhile you can use client node or JDBC or REST.
--
Alexey Kuznetsov
Rick,
Yes, you have to start a node to get access to the grid from another JVM,
Or use REST, or JDBC client.
чт, 22 марта 2018, 9:49 Pavel Vinokurov :
> Hi Rick,
>
> You could use rest api that documented in
> https://apacheignite.readme.io/docs/rest-api .
>
> Thanks,
Hi Pavel,
I knew the rest api way to get/put data. But, I am looking for an easier way to
get/put data.
It likes the relationship between Redis and Jedis.
Thanks
Rick
From: Pavel Vinokurov [mailto:vinokurov.pa...@gmail.com]
Sent: Thursday, March 22, 2018 2:49 PM
To: user@ignite.apache.org
Hi Rick,
You could use rest api that documented in
https://apacheignite.readme.io/docs/rest-api .
Thanks,
Pavel
2018-03-22 9:44 GMT+03:00 :
> Dear all,
>
>
>
> My settings of running environment is as:
>
> OS: Ubuntn 14.04.3 LTS
>
> JAVA: JDK 1.7
>
> Ignite: 2.4.0
>
>
>
>
Dear all,
My settings of running environment is as:
OS: Ubuntn 14.04.3 LTS
JAVA: JDK 1.7
Ignite: 2.4.0
I would like to get all data of one cache in Ignite
Without creating a new ignite node, I do not know how to get data by another
executive java program (without the Ignition.getOrStart(cfg)).
11 matches
Mail list logo