Interface BoundStatement

    • Method Detail

      • getPreparedStatement

        @NonNull
        PreparedStatement getPreparedStatement()
        The prepared statement that was used to create this statement.
      • getValues

        @NonNull
        List<ByteBuffer> getValues()
        The values to bind, in their serialized form.
      • getKeyspace

        @Nullable
        default CqlIdentifier getKeyspace()
        Always returns null (bound statements can't have a per-request keyspace, they always inherit the one of the statement that was initially prepared).
        Specified by:
        getKeyspace in interface Request
        See Also:
        CASSANDRA-10145
      • computeSizeInBytes

        default int computeSizeInBytes​(@NonNull
                                       DriverContext context)
        Description copied from interface: Statement
        Calculates the approximate size in bytes that the statement will have when encoded.

        The size might be over-estimated by a few bytes due to global options that may be defined on a Session but not explicitly set on the statement itself.

        The result of this method is not cached, calling it will cause some encoding to be done in order to determine some of the statement's attributes sizes. Therefore, use this method sparingly in order to avoid unnecessary computation.

        Specified by:
        computeSizeInBytes in interface Statement<BoundStatement>
        Returns:
        the approximate number of bytes this statement will take when encoded.