Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public static void main(String[] args) throws Exception {
try (IgniteClient client = IgniteClient.builder()
.addresses("127.0.0.1:10800")
.build()) {
System.out.println("Creating Person table");
client.sql().execute(null, "CREATE TABLE IF NOT EXISTS Person (id int primary key, city varchar, name varchar, age int, company varchar, city_id int);");
client.sql().execute(null, "INSERT INTO Person (id, city, name, age, company, city_id) VALUES (1, 'London', 'John Doe', 42, 'Apache', 101);");
client.sql().execute(null, "INSERT INTO Person (id, city, name, age, company, city_id) VALUES (2, 'New York', 'Jane Doe', 36, 'Apache', 102);");

// Get a table
IgniteTables tablesApi = client.tables();
Expand All @@ -51,6 +55,9 @@ public static void main(String[] args) throws Exception {

// Example 3: Query asynchronously
performQueryAsync(myTable);

System.out.println("Dropping Person table.");
client.sql().execute(null, "DROP TABLE IF EXISTS PERSON;");
}
}

Expand Down