|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SQLMaker
Turns SQL objects into database-ready sql. The sql strings that are returned by this function
are then ready to be run on the database.
Example-- getDeleteSQL(a_delete_SQL_Object) would return something like:
DELETE FROM Users WHERE UserID=53
The SQL statement generated will differ slightly among databases.
Different databases have to implement their own SQLMaker. This is because, for example, an
UpdateSQL object may contain a field called BirthDate. The actual SQL that is generated from
this UpdateSQL object will be different between databases as dates are often handled
differently. So for sybase you might see the UpdateSQL statement get turned into:
UPDATE Employees SET BirthDate='1978-04-31' WHERE EmployeeID=1
where for oracle it might be turned into:
UPDATE Employees SET BirthDate=to_db_date(1978,4,31) WHERE EmployeeID=1
Method Summary | |
---|---|
java.lang.String |
getDeleteSQL(DeleteSQL deleteSQL)
Returns a DELETE SQL string that is ready to be run on the database. |
TwoSQLStatements |
getInsertSQL(InsertSQL insertSQL)
Returns a INSERT SQL string that is ready to be run on the database. |
java.lang.String |
getSelectSQL(SelectSQL selectSQL)
Returns a SELECT SQL string that is ready to be run on the database. |
java.lang.String |
getUpdateSQL(UpdateSQL updateSQL)
Returns a UPDATE SQL string that is ready to be run on the database. |
Method Detail |
---|
TwoSQLStatements getInsertSQL(InsertSQL insertSQL)
java.lang.String getSelectSQL(SelectSQL selectSQL)
java.lang.String getUpdateSQL(UpdateSQL updateSQL)
java.lang.String getDeleteSQL(DeleteSQL deleteSQL)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |