source upload

This commit is contained in:
Razor12911
2022-01-17 22:16:47 +02:00
parent 12936d065b
commit 098e8c48de
1778 changed files with 1206749 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
unit uQueryHistory;
interface
uses
SynCommons,
mORMot;
type
TSQLQueryHistory = class(TSQLRecord)
private
fSQL: RawUTF8;
fLastUsed: TDateTime;
published
property SQL: RawUTF8 read fSQL write fSQL;
property LastUsed: TDateTime read fLastUsed write fLastUsed;
public
procedure FillHistory();
end;
implementation
uses SysUtils, uCustomer;
procedure TSQLQueryHistory.FillHistory();
var
fData: TSQLTable;
begin
if globalClient = nil then
exit;
fData:= globalClient.MultiFieldValues(RecordClass, '');
fData.SortFields(fData.FieldIndex('LastUsed'), false, nil, sftDateTime);
fData.OwnerMustFree:= true;
FillPrepare(fData);
end;
end.