LoadBlobFromFile takes only a single parameter and returns a blob
This commit is contained in:
parent
9746ae578d
commit
c8fb94b176
@ -19,9 +19,8 @@ grant execute on function flagged to public;
|
|||||||
|
|
||||||
|
|
||||||
create or alter function LoadBlobFromFile (
|
create or alter function LoadBlobFromFile (
|
||||||
afilename varchar(8191),
|
afilename varchar(8191)
|
||||||
ablob BLOB
|
) returns BLOB
|
||||||
) returns bigint
|
|
||||||
external name 'MyFirstUDRKit!MFK_LoadBlobFromFile!Load file and save to Blob'
|
external name 'MyFirstUDRKit!MFK_LoadBlobFromFile!Load file and save to Blob'
|
||||||
engine udr;
|
engine udr;
|
||||||
grant execute on function LoadBlobFromFile to public;
|
grant execute on function LoadBlobFromFile to public;
|
||||||
|
@ -174,11 +174,10 @@ FB_UDR_BEGIN_FUNCTION (MFK_LoadBlobFromFile)
|
|||||||
//BEGIN
|
//BEGIN
|
||||||
FB_UDR_MESSAGE(InMessage,
|
FB_UDR_MESSAGE(InMessage,
|
||||||
(FB_VARCHAR(8191), afilename)
|
(FB_VARCHAR(8191), afilename)
|
||||||
(FB_BLOB, ablob)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
FB_UDR_MESSAGE(OutMessage,
|
FB_UDR_MESSAGE(OutMessage,
|
||||||
(FB_BIGINT, result)
|
(FB_BLOB, ablob)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -190,8 +189,8 @@ FB_UDR_EXECUTE_FUNCTION
|
|||||||
{
|
{
|
||||||
// Test Input
|
// Test Input
|
||||||
if (in->afilenameNull != 0) {
|
if (in->afilenameNull != 0) {
|
||||||
out->resultNull = FB_TRUE;
|
out->ablobNull = FB_TRUE;
|
||||||
out->result = 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ifstream FileReader;
|
std::ifstream FileReader;
|
||||||
|
Loading…
Reference in New Issue
Block a user