Add LoadBlobFromFile

This commit is contained in:
Paul Reeves 2023-01-25 09:53:53 +01:00
parent 838b728938
commit 30f91ff58e
3 changed files with 29 additions and 8 deletions

View File

@ -16,8 +16,14 @@ returns integer
external name 'my_first_udr_kit!MFK_flagged!How is this function used?' engine udr; external name 'my_first_udr_kit!MFK_flagged!How is this function used?' engine udr;
create or alter function LoadBlobFromFile (
afilename varchar(8191),
ablob BLOB
) returns bigint
external name 'my_first_udr_kit!MFK_Load_Blob_From_File!Load file and save to Blob'
engine udr;
-- Add some grants here perhaps? -- Add some grants here perhaps?
grant execute on function div to public; grant execute on function div to public;
grant execute on function flagged to public; grant execute on function flagged to public;
grant execute on function LoadBlobFromFile to public;

View File

@ -20,6 +20,11 @@ begin
) )
returns integer; returns integer;
function LoadBlobFromFile (
afilename varchar(8191),
ablob BLOB
)
returns bigint;
end ^ end ^
@ -30,15 +35,25 @@ begin
function div ( function div (
anumerator integer, adenominator integer anumerator integer, adenominator integer
) )
returns double precision returns double precision
external name 'udf_compat!UC_div!Divide anumerator by adenominator' engine udr; external name 'udf_compat!UC_div!Divide anumerator by adenominator' engine udr;
function flagged ( function flagged (
flags integer, flag integer flags integer, flag integer
) )
returns integer returns integer
external name 'my_first_udr_kit!MFK_flagged!How is this function used?' engine udr; external name 'my_first_udr_kit!MFK_flagged!How is this function used?' engine udr;
function LoadBlobFromFile (
afilename varchar(8191),
ablob BLOB
)
returns bigint
external name 'my_first_udr_kit!MFK_Load_Blob_From_File!Load file and save to Blob' engine udr;
end ^ end ^

View File

@ -169,11 +169,11 @@ FB_UDR_END_FUNCTION
/*** DDL /*** DDL
create function Blob_Save ( create or alter function LoadBlobFromFile (
afilename varchar(8191), afilename varchar(8191),
ablob BLOB ablob BLOB
) returns bigint ) returns bigint
external name 'my_first_udr_kit!MFK_Blob_Save!Load file and save to Blob' external name 'my_first_udr_kit!MFK_Load_Blob_From_File!Load file and save to Blob'
engine udr; engine udr;
***/ ***/