Quadcap Embeddable Database

com.quadcap.sql.StmtUpdate Class Reference

Inheritance diagram for com.quadcap.sql.StmtUpdate:

com.quadcap.sql.Stmt List of all members.

Detailed Description

Implementation of the SQL UPDATE statement.

Author:
Stan Bailes

Definition at line 56 of file StmtUpdate.java.

Public Member Functions

 StmtUpdate ()
 Default constructor.

 StmtUpdate (String tableName)
 Explicit constructor from table name only.

void addItem (UpdateItem item)
 Add a new update item.

void addWhere (Expression where)
 Add a 'where' expression.

void execute (Session session) throws IOException, SQLException
 Excute the update operation.


Package Attributes

String tableName
SelectExpression select
Vector items


Constructor & Destructor Documentation

com.quadcap.sql.StmtUpdate.StmtUpdate  ) 
 

Default constructor.

Definition at line 64 of file StmtUpdate.java.

com.quadcap.sql.StmtUpdate.StmtUpdate String  tableName  ) 
 

Explicit constructor from table name only.

Definition at line 69 of file StmtUpdate.java.


Member Function Documentation

void com.quadcap.sql.StmtUpdate.addItem UpdateItem  item  ) 
 

Add a new update item.

Definition at line 77 of file StmtUpdate.java.

References com.quadcap.sql.StmtUpdate.addItem(), and com.quadcap.sql.StmtUpdate.items.

Referenced by com.quadcap.sql.StmtUpdate.addItem(), and com.quadcap.sql.SQLParser.updateStmt().

void com.quadcap.sql.StmtUpdate.addWhere Expression  where  ) 
 

Add a 'where' expression.

Definition at line 84 of file StmtUpdate.java.

References com.quadcap.sql.StmtUpdate.addWhere(), com.quadcap.sql.StmtUpdate.select, and com.quadcap.sql.StmtUpdate.tableName.

Referenced by com.quadcap.sql.StmtUpdate.addWhere(), and com.quadcap.sql.SQLParser.updateStmt().

void com.quadcap.sql.StmtUpdate.execute Session  session  )  throws IOException, SQLException
 

Excute the update operation.

Implements com.quadcap.sql.Stmt.

Definition at line 91 of file StmtUpdate.java.

References com.quadcap.sql.Cursor.close(), com.quadcap.sql.UpdateItem.evaluate(), com.quadcap.sql.StmtUpdate.execute(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.Cursor.getRow(), com.quadcap.sql.Relation.isUpdatable(), com.quadcap.sql.StmtUpdate.items, com.quadcap.sql.Cursor.next(), com.quadcap.sql.StmtUpdate.select, com.quadcap.sql.StmtUpdate.tableName, com.quadcap.sql.UpdateItem.update(), and com.quadcap.sql.Cursor.updateRow().

Referenced by com.quadcap.sql.StmtUpdate.execute().


Member Data Documentation

Vector com.quadcap.sql.StmtUpdate.items [package]
 

Definition at line 59 of file StmtUpdate.java.

Referenced by com.quadcap.sql.StmtUpdate.addItem(), and com.quadcap.sql.StmtUpdate.execute().

SelectExpression com.quadcap.sql.StmtUpdate.select [package]
 

Definition at line 58 of file StmtUpdate.java.

Referenced by com.quadcap.sql.StmtUpdate.addWhere(), and com.quadcap.sql.StmtUpdate.execute().

String com.quadcap.sql.StmtUpdate.tableName [package]
 

Definition at line 57 of file StmtUpdate.java.

Referenced by com.quadcap.sql.StmtUpdate.addWhere(), and com.quadcap.sql.StmtUpdate.execute().