フォーラム


ゲスト  

ようこそ ゲスト さん。このフォーラムに投稿するには 登録が必要です。

ページ: [1]
トピック: uSQLBuilder
DEKO
管理者
投稿数: 2374
uSQLBuilder
on: 2016/12/18 19:37 Sun

SQL を組み立てるためのレコード。ゆるふわ系。

type

{ TSelectSQL }
TSelectSQL = record
SELECT: string;
FROM: string;
WHERE: string;
GROUP: string;
HAVING: string;
UNION: string;
PLAN: string;
ORDER: string;
function Build(Terminate: Boolean = False): string;
procedure Init;
end;

{ TInsertSQL }
TInsertSQL = record
INSERT_INTO: string;
FIELDS: string;
VALUES: string;
RETURNING: string;
function Build(Terminate: Boolean = False): string;
procedure Init;
end;

{ TUpdateSQL }
TUpdateSQL = record
UPDATE: string;
SET_: string;
WHERE: string;
function Build(Terminate: Boolean = False): string;
procedure Init;
end;

{ TDeleteSQL }
TDeleteSQL = record
DELETE_FROM: string;
WHERE: string;
function Build(Terminate: Boolean = False): string;
procedure Init;
end;

{ TChainSelectSQL }
TChainSelectSQL = record
SQL: string;
function SELECT(aSELECT: string): TChainSelectSQL;
function FROM(aFROM: string): TChainSelectSQL;
function WHERE(aWHERE: string): TChainSelectSQL;
function GROUP_BY(aGROUP: string): TChainSelectSQL;
function ORDER_BY(aORDER: string): TChainSelectSQL;
function HAVING(aHAVING: string): TChainSelectSQL;
function UNION(aUNION: string): TChainSelectSQL;
procedure Init;
function Term(Terminate: Boolean = False): string;
end;

{ TChainInsertSQL }
TChainInsertSQL = record
SQL: string;
function INSERT_INTO(aINSERT_INTO: string; aFIELDS: string = ''): TChainInsertSQL;
function VALUES(aVALUES: string): TChainInsertSQL;
function RETURNING(aRETURNING: string): TChainInsertSQL;
procedure Init;
function Term(Terminate: Boolean = False): string;
end;

{ TChainUpdateSQL }
TChainUpdateSQL = record
SQL: string;
function UPDATE(aUPDATE: string): TChainUpdateSQL;
function SET_(aSET: string): TChainUpdateSQL;
function WHERE(aWHERE: string): TChainUpdateSQL;
procedure Init;
function Term(Terminate: Boolean = False): string;
end;

{ TChainUpdateSQL }
TChainDeleteSQL = record
SQL: string;
function DELETE_FROM(aDELETE: string): TChainDeleteSQL;
function WHERE(aWHERE: string): TChainDeleteSQL;
procedure Init;
function Term(Terminate: Boolean = False): string;
end;

 
Download: http://ht-deko.com/software/uSQLBuilder_100.zip

ページ: [1]

WP Forum Server by ForumPress | LucidCrew
バージョン: 1.7.5 ; ページロード: 0.055 sec.