-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSQLG.CreateTable.pas
More file actions
43 lines (30 loc) · 817 Bytes
/
SQLG.CreateTable.pas
File metadata and controls
43 lines (30 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
unit SQLG.CreateTable;
interface
uses
System.SysUtils, System.Rtti, SQLG.Params, SQLG.Table;
type
TSQLCreateTable = record
private
FTable: TSQLTable;
FIfNotExists: Boolean;
public
function Build(var Params: TSQLParams): string;
end;
function CreateTable(const Table: TSQLTable): TSQLCreateTable; overload;
function CreateTableIfNotExists(const Table: TSQLTable): TSQLCreateTable; overload;
implementation
function CreateTableIfNotExists(const Table: TSQLTable): TSQLCreateTable;
begin
Result.FTable := Table;
Result.FIfNotExists := True;
end;
function CreateTable(const Table: TSQLTable): TSQLCreateTable;
begin
Result.FTable := Table;
Result.FIfNotExists := False;
end;
{ TSQLCreateTable }
function TSQLCreateTable.Build(var Params: TSQLParams): string;
begin
end;
end.