ptupitsyn commented on issue #11887:
URL: https://github.com/apache/ignite/issues/11887#issuecomment-2792133746
@hsadia538
* You can use `VARCHAR` or `VARBINARY` columns to store arbitrary data
* For key-value storage, SQL is not necessary, below is a simple example
```java
IgniteClient client = IgniteClient.builder()
.addresses("localhost:10800")
.build();
TableDefinition tableDefinition = TableDefinition.builder("my_table")
.columns(
ColumnDefinition.column("ID", ColumnType.INT64),
ColumnDefinition.column("NAME", ColumnType.VARCHAR)
)
.primaryKey("ID")
.ifNotExists()
.build();
Table table = client.catalog().createTable(tableDefinition);
KeyValueView<Long, String> kvView = table.keyValueView(Long.class,
String.class);
kvView.put(null, 1L, "val");
```
--
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]