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
ConstructorsConstructorDescriptionNo-argument constructor that initializesinsertedIdto an emptyArrayListandprimaryKeySchemato an emptyLinkedHashMap. -
Method Summary
-
Constructor Details
-
TableInsertOneResult
public TableInsertOneResult()No-argument constructor that initializesinsertedIdto an emptyArrayListandprimaryKeySchemato 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 theinsertedIdlist are used as values.- Returns:
- a
Rowrepresentation of the inserted ID values - Throws:
IndexOutOfBoundsException- if the size ofinsertedIddoes not match the number of columns inprimaryKeySchema
-