中国开发网: 论坛: 程序员情感CBD: 贴子 114659
李战
今天要实现这个类
TSqlSelect = class
private
FDistinct: boolean;
FTop: Integer;
FSelectList: TStrings;
FFromList: TStrings;
FWhere: string;
FGroupByList: TStrings;
FHaving: string;
FOrderByList: TStrings;
private
function GetSQL: string;
procedure SetSQL(const Value: string);
function GetSelects: string;
procedure SetSelects(const Value: string);
function GetFroms: string;
procedure SetFroms(const Value: string);
function GetGroupBys: string;
procedure SetGroupBys(const Value: string);
function GetOrderBys: string;
procedure SetOrderBys(const Value: string);
public
property SQL: string read GetSQL write SetSQL;
property Distinct: boolean read FDistinct write FDistinct;
property Top: Integer read FTop write FTop;
property Selects: string read GetSelects write SetSelects;
property SelectList: TStrings read FSelectList;
property Froms: string read GetFroms write SetFroms;
property FormList: TStrings read FFromList;
property Where: string read FWhere write FWhere;
property GroupBys: string read GetGroupBys write SetGroupBys;
property GroupByList: TStrings read FGroupByList;
property Having: string read FHaving write FHaving;
property OrderBys: string read GetOrderBys write SetOrderBys;
property OrderByList: TStrings read FOrderByList;
public
procedure AddSelects(const aSelects: string);
procedure AddFroms(const aFroms: string);
procedure AddJoins(const aJoins: string; aFromIndex: Integer=0);
procedure AndWhere(const aWhere: string);
procedure OrWhere(const aWhere: string);
procedure AddGroupBys(const aGroupBys: string);
procedure AndHaving(const aHaving: string);
procedure OrHaving(const aHaving: string);
procedure AddOrderBys(const aOrderBys: string);
end;
李战(leadzen)

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录