All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Zql.ZUpdate

java.lang.Object
   |
   +----Zql.ZUpdate

public class ZUpdate
extends Object
implements ZStatement
ZUpdate: an SQL UPDATE statement.


Constructor Index

 o ZUpdate(String)
Create an UPDATE statement on a given table.

Method Index

 o addSet(Hashtable)
Insert a SET...
 o addWhere(ZExp)
Insert a WHERE...
 o getColumnUpdate(String)
Get the SQL expression that specifies a given column's update value.
 o getSet()
Get the whole SET...
 o getWhere()
Get the WHERE clause of this UPDATE statement.
 o toString()

Constructors

 o ZUpdate
 public ZUpdate(String tab)
Create an UPDATE statement on a given table.

Methods

 o addSet
 public void addSet(Hashtable t)
Insert a SET... clause in the UPDATE statement

Parameters:
t - A Hashtable, where keys are column names (the columns to update), and values are ZExp objects (the column values). For example, the values may be ZConstant objects (like "Smith") or more complex SQL Expressions.
 o getSet
 public Hashtable getSet()
Get the whole SET... clause

Returns:
A Hashtable, where keys are column names (the columns to update), and values are ZExp objects (Expressions that specify column values: for example, ZConstant objects like "Smith").
 o getColumnUpdate
 public ZExp getColumnUpdate(String col)
Get the SQL expression that specifies a given column's update value. (for example, a ZConstant object like "Smith").

Parameters:
col - The column name.
Returns:
a ZExp, like a ZConstant representing a value, or a more complex SQL expression.
 o addWhere
 public void addWhere(ZExp w)
Insert a WHERE... clause in the UPDATE statement

Parameters:
w - An SQL Expression compatible with a WHERE... clause.
 o getWhere
 public ZExp getWhere()
Get the WHERE clause of this UPDATE statement.

Returns:
An SQL Expression compatible with a WHERE... clause.
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index