Class TableInsertOneResult

java.lang.Object
com.datastax.astra.client.tables.commands.results.TableInsertOneResult

public class TableInsertOneResult extends Object
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 Details

    • TableInsertOneResult

      public TableInsertOneResult()
      No-argument constructor that initializes insertedId to an empty ArrayList and primaryKeySchema to an empty LinkedHashMap.
  • Method Details

    • getInsertedIdAsRow

      public Row getInsertedIdAsRow()
      Converts the inserted ID values into a structured Row. The column names from the primary key schema are used as keys in the resulting row, and the corresponding values from the insertedId list are used as values.
      Returns:
      a Row representation of the inserted ID values
      Throws:
      IndexOutOfBoundsException - if the size of insertedId does not match the number of columns in primaryKeySchema