You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
979 B
Plaintext

8 months ago
/*
* This demonstrates how to declare the UDRs globally
*/
create or alter function div (
anumerator bigint, adenominator bigint
8 months ago
)
returns bigint
external name 'MyFirstUDRKit!MFK_div!Divide anumerator by adenominator' engine udr;
grant execute on function div to public;
8 months ago
8 months ago
8 months ago
create or alter function flagged (
flags integer, flag integer
)
returns integer
external name 'MyFirstUDRKit!MFK_flagged!Check if flag is set in flags. flag is zero-based.' engine udr;
grant execute on function flagged to public;
8 months ago
create or alter function LoadBlobFromFile (
afilename varchar(8191)
) returns BLOB
external name 'MyFirstUDRKit!MFK_LoadBlobFromFile!Load file and save to Blob'
engine udr;
grant execute on function LoadBlobFromFile to public;
create or alter function SaveBlobToFile (
afilename varchar(8191),
ablob BLOB
) returns bigint
external name 'MyFirstUDRKit!MFK_SaveBlobToFile!Save blob to file'
engine udr;
grant execute on function SaveBlobToFile to public;