org.apache.cassandra.cql3
Interface CQLStatement

All Known Implementing Classes:
AlterKeyspaceStatement, AlterTableStatement, BatchStatement, CreateColumnFamilyStatement, CreateIndexStatement, CreateKeyspaceStatement, DeleteStatement, DropColumnFamilyStatement, DropIndexStatement, DropKeyspaceStatement, GrantStatement, ListGrantsStatement, ModificationStatement, RevokeStatement, SchemaAlteringStatement, SelectStatement, TruncateStatement, UpdateStatement, UseStatement

public interface CQLStatement


Method Summary
 void checkAccess(ClientState state)
          Perform any access verification necessary for the statement.
 org.apache.cassandra.thrift.CqlResult execute(ClientState state, java.util.List<java.nio.ByteBuffer> variables)
          Execute the statement and return the resulting result or null if there is no result.
 int getBoundsTerms()
          Returns the number of bound terms in this statement.
 void validate(ClientState state)
          Perform additional validation required by the statment.
 

Method Detail

getBoundsTerms

int getBoundsTerms()
Returns the number of bound terms in this statement.


checkAccess

void checkAccess(ClientState state)
                 throws org.apache.cassandra.thrift.InvalidRequestException
Perform any access verification necessary for the statement.

Parameters:
state - the current client state
Throws:
org.apache.cassandra.thrift.InvalidRequestException

validate

void validate(ClientState state)
              throws org.apache.cassandra.thrift.InvalidRequestException,
                     org.apache.cassandra.thrift.SchemaDisagreementException
Perform additional validation required by the statment. To be overriden by subclasses if needed.

Parameters:
state - the current client state
Throws:
org.apache.cassandra.thrift.InvalidRequestException
org.apache.cassandra.thrift.SchemaDisagreementException

execute

org.apache.cassandra.thrift.CqlResult execute(ClientState state,
                                              java.util.List<java.nio.ByteBuffer> variables)
                                              throws org.apache.cassandra.thrift.InvalidRequestException,
                                                     org.apache.cassandra.thrift.UnavailableException,
                                                     org.apache.cassandra.thrift.TimedOutException,
                                                     org.apache.cassandra.thrift.SchemaDisagreementException
Execute the statement and return the resulting result or null if there is no result.

Parameters:
state - the current client state
variables - the values for bounded variables. The implementation can assume that each bound term have a corresponding value.
Throws:
org.apache.cassandra.thrift.InvalidRequestException
org.apache.cassandra.thrift.UnavailableException
org.apache.cassandra.thrift.TimedOutException
org.apache.cassandra.thrift.SchemaDisagreementException


Copyright © 2012 The Apache Software Foundation