Class TableInsertOneResult
java.lang.Object
com.datastax.astra.client.tables.commands.results.TableInsertOneResult
Represents the result of a single row insertion into a table, containing the
inserted primary key values and the schema of the primary key.
This class provides utility methods to retrieve the inserted ID as a structured row.
-
Constructor Summary
ConstructorDescriptionNo-argument constructor that initializesinsertedId
to an emptyArrayList
andprimaryKeySchema
to an emptyLinkedHashMap
. -
Method Summary
-
Constructor Details
-
TableInsertOneResult
public TableInsertOneResult()No-argument constructor that initializesinsertedId
to an emptyArrayList
andprimaryKeySchema
to an emptyLinkedHashMap
.
-
-
Method Details
-
getInsertedIdAsRow
Converts the inserted ID values into a structuredRow
. The column names from the primary key schema are used as keys in the resulting row, and the corresponding values from theinsertedId
list are used as values.- Returns:
- a
Row
representation of the inserted ID values - Throws:
IndexOutOfBoundsException
- if the size ofinsertedId
does not match the number of columns inprimaryKeySchema
-