Package com.j_spaces.jdbc
Class AlterTableQuery
java.lang.Object
com.j_spaces.jdbc.AlterTableQuery
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()booleanGets whether this query contains sub queries.executeOnSpace(ISpaceProxy space, Transaction txn) Will execute this query on the space and return a ResponsePacketbooleanGets whether this query is forced to be executed under transaction.booleanvoidsetIndices(String[] indices) voidsetSecurityInterceptor(SecurityInterceptor securityInterceptor) voidsetSession(QuerySession session) voidsetTableName(String table) voidvalidateQuery(ISpaceProxy space) Each query should have its own specific validations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.j_spaces.jdbc.Query
validateQuery
-
Constructor Details
-
AlterTableQuery
public AlterTableQuery()
-
-
Method Details
-
executeOnSpace
Description copied from interface:QueryWill execute this query on the space and return a ResponsePacket- Specified by:
executeOnSpacein interfaceQuery- Throws:
SQLException
-
validateQuery
Description copied from interface:QueryEach 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:
validateQueryin interfaceQuery- Throws:
SQLException
-
setTableName
-
setSession
- Specified by:
setSessionin interfaceQuery
-
getSession
-
setIndices
-
build
- Specified by:
buildin interfaceQuery- Throws:
SQLException
-
isPrepared
public boolean isPrepared()- Specified by:
isPreparedin interfaceQuery- Returns:
- isPrepared is this a PreparedStatment or not.
-
setSecurityInterceptor
- Specified by:
setSecurityInterceptorin interfaceQuery
-
getSecurityInterceptor
- Returns:
- the securityInterceptor
-
isForceUnderTransaction
public boolean isForceUnderTransaction()Description copied from interface:QueryGets whether this query is forced to be executed under transaction.- Specified by:
isForceUnderTransactionin interfaceQuery
-
containsSubQueries
public boolean containsSubQueries()Description copied from interface:QueryGets whether this query contains sub queries.- Specified by:
containsSubQueriesin interfaceQuery
-