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,33 @@
/// receive SQLite3 results from JSON/SQL HTTP server
program JSONSQLClient;
{$APPTYPE CONSOLE}
uses
{$I SynDprUses.inc} // use FastMM4 on older Delphi, or set FPC threads
SysUtils,
SynCrtSock,
SynCommons;
function Client(const SQL: RawUTF8): RawUTF8;
var Http: THttpClientSocket;
URI: AnsiString;
begin
if ParamCount<>0 then
URI := AnsiString(ParamStr(1)) else
URI := 'localhost';
Http := OpenHttp(URI,'888');
if Http<>nil then
try
Http.Post('root',SQL,TEXT_CONTENT_TYPE);
result := Http.Content;
finally
Http.Free;
end else
result := '';
end;
begin
writeln(Client('select * from People where LastName=''Schubert'''));
readln;
end.