iartiukhov commented on code in PR #7103:
URL: https://github.com/apache/ignite-3/pull/7103#discussion_r2601416488
##########
examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java:
##########
@@ -37,23 +40,52 @@ public Integer toColumnType(String cityId) {
}
public static void main(String[] args) throws Exception {
- var mapper = Mapper.builder(Person.class)
- .automap()
- .map("cityId", "city_id", new CityIdConverter())
- .build();
- try (IgniteClient client = IgniteClient.builder()
- .addresses("127.0.0.1:10800")
- .build()
- ) {
- RecordView<Person> view = client.tables()
- .table("person")
- .recordView(mapper);
+ try (Connection conn =
DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/")) {
+ try (Statement stmt = conn.createStatement()) {
- Person myPerson = new Person(2, "2", "John Doe", 40, "Apache");
+ stmt.executeUpdate(
+ "CREATE TABLE IF NOT EXISTS Person ("
Review Comment:
Let's implement the idea from [this
comment](https://github.com/apache/ignite-3/pull/7122#discussion_r2598952107)
by removing `IF NOT EXISTS`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]