mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-07 15:00:53 +02:00
* Rest bridge returns blob as base64 encoded data
This commit is contained in:
parent
3d687576c6
commit
ae4df85df3
@ -77,6 +77,7 @@ Type
|
|||||||
procedure SetResourceName(AValue: String);
|
procedure SetResourceName(AValue: String);
|
||||||
procedure SetSQL(AValue: TStrings);
|
procedure SetSQL(AValue: TStrings);
|
||||||
Protected
|
Protected
|
||||||
|
Class Function DefaultBlobDataToBytes(aValue : JSValue) : TBytes; override;
|
||||||
function DataPacketReceived(ARequest: TDataRequest): Boolean; override;
|
function DataPacketReceived(ARequest: TDataRequest): Boolean; override;
|
||||||
function GetStringFieldLength(F: TJSObject; AName: String; AIndex: Integer): integer;virtual;
|
function GetStringFieldLength(F: TJSObject; AName: String; AIndex: Integer): integer;virtual;
|
||||||
function StringToFieldType(S: String): TFieldType; virtual;
|
function StringToFieldType(S: String): TFieldType; virtual;
|
||||||
@ -326,6 +327,13 @@ begin
|
|||||||
FSQL.Assign(AValue);
|
FSQL.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class function TSQLDBRestDataset.DefaultBlobDataToBytes(aValue: JSValue): TBytes;
|
||||||
|
begin
|
||||||
|
Result:=BytesOf(Window.atob(String(aValue)));
|
||||||
|
end;
|
||||||
|
|
||||||
function TSQLDBRestDataset.DoGetDataProxy: TDataProxy;
|
function TSQLDBRestDataset.DoGetDataProxy: TDataProxy;
|
||||||
begin
|
begin
|
||||||
Result:=Connection.DataProxy;
|
Result:=Connection.DataProxy;
|
||||||
|
Loading…
Reference in New Issue
Block a user