use of org.apache.ignite.internal.schema.row.Row in project ignite-3 by apache.
the class RecordBinaryViewImpl method getAsync.
/**
* {@inheritDoc}
*/
@Override
@NotNull
public CompletableFuture<Tuple> getAsync(@Nullable Transaction tx, @NotNull Tuple keyRec) {
Objects.requireNonNull(keyRec);
// Convert to portable format to pass TX/storage layer.
final Row keyRow = marshal(keyRec, true);
return tbl.get(keyRow, (InternalTransaction) tx).thenApply(this::wrap);
}
use of org.apache.ignite.internal.schema.row.Row in project ignite-3 by apache.
the class RecordBinaryViewImpl method insertAsync.
/**
* {@inheritDoc}
*/
@Override
@NotNull
public CompletableFuture<Boolean> insertAsync(@Nullable Transaction tx, @NotNull Tuple rec) {
Objects.requireNonNull(rec);
final Row row = marshal(rec, false);
return tbl.insert(row, (InternalTransaction) tx);
}
use of org.apache.ignite.internal.schema.row.Row in project ignite-3 by apache.
the class KeyValueBinaryViewImpl method getAsync.
/**
* {@inheritDoc}
*/
@Override
@NotNull
public CompletableFuture<Tuple> getAsync(@Nullable Transaction tx, @NotNull Tuple key) {
Objects.requireNonNull(key);
// Convert to portable format to pass TX/storage layer.
Row keyRow = marshal(key, null);
return // Load async.
tbl.get(keyRow, (InternalTransaction) tx).thenApply(// Binary -> schema-aware row
this::wrap).thenApply(// Narrow to value.
TableRow::valueTuple);
}
use of org.apache.ignite.internal.schema.row.Row in project ignite-3 by apache.
the class KeyValueBinaryViewImpl method getAndPutAsync.
/**
* {@inheritDoc}
*/
@Override
@NotNull
public CompletableFuture<Tuple> getAndPutAsync(@Nullable Transaction tx, @NotNull Tuple key, Tuple val) {
Objects.requireNonNull(key);
// Convert to portable format to pass TX/storage layer.
Row row = marshal(key, val);
return tbl.getAndUpsert(row, (InternalTransaction) tx).thenApply(// Binary -> schema-aware row
this::wrap).thenApply(// Narrow to value.
TableRow::valueTuple);
}
use of org.apache.ignite.internal.schema.row.Row in project ignite-3 by apache.
the class KeyValueBinaryViewImpl method replaceAsync.
/**
* {@inheritDoc}
*/
@Override
@NotNull
public CompletableFuture<Boolean> replaceAsync(@Nullable Transaction tx, @NotNull Tuple key, @NotNull Tuple val) {
Objects.requireNonNull(key);
Objects.requireNonNull(val);
// Convert to portable format to pass TX/storage layer.
Row row = marshal(key, val);
return tbl.replace(row, (InternalTransaction) tx);
}
Aggregations