Class AlterTableQuery

java.lang.Object
com.j_spaces.jdbc.AlterTableQuery
All Implemented Interfaces:
Query

public class AlterTableQuery extends Object implements Query
The ALTER TABLE implementation. Currently the only syntax supported is: ALTER TABLE table_name ADD PRIMARY KEY(column_name) USING INDEX The command above will cause table_name to be dropped with all its data and then recreated using the given columns as indices.
Author:
Michael Mitrani, 2Train4, 2004
  • Constructor Details

    • AlterTableQuery

      public AlterTableQuery()
  • Method Details

    • executeOnSpace

      public ResponsePacket executeOnSpace(ISpaceProxy space, Transaction txn) throws SQLException
      Description copied from interface: Query
      Will execute this query on the space and return a ResponsePacket
      Specified by:
      executeOnSpace in interface Query
      Throws:
      SQLException
    • validateQuery

      public void validateQuery(ISpaceProxy space) throws SQLException
      Description copied from interface: Query
      Each query should have its own specific validations. this is the place to do them. if some validation fail, an SQLException will be thrown.
      Specified by:
      validateQuery in interface Query
      Throws:
      SQLException
    • setTableName

      public void setTableName(String table)
    • setSession

      public void setSession(QuerySession session)
      Specified by:
      setSession in interface Query
    • getSession

      public QuerySession getSession()
    • setIndices

      public void setIndices(String[] indices)
    • build

      public void build() throws SQLException
      Specified by:
      build in interface Query
      Throws:
      SQLException
    • isPrepared

      public boolean isPrepared()
      Specified by:
      isPrepared in interface Query
      Returns:
      isPrepared is this a PreparedStatment or not.
    • setSecurityInterceptor

      public void setSecurityInterceptor(SecurityInterceptor securityInterceptor)
      Specified by:
      setSecurityInterceptor in interface Query
    • getSecurityInterceptor

      public SecurityInterceptor getSecurityInterceptor()
      Returns:
      the securityInterceptor
    • isForceUnderTransaction

      public boolean isForceUnderTransaction()
      Description copied from interface: Query
      Gets whether this query is forced to be executed under transaction.
      Specified by:
      isForceUnderTransaction in interface Query
    • containsSubQueries

      public boolean containsSubQueries()
      Description copied from interface: Query
      Gets whether this query contains sub queries.
      Specified by:
      containsSubQueries in interface Query