MyFirstUDRKit/sql/MyFirstUDRKitPackage.sql

44 lines
777 B
MySQL
Raw Normal View History

2023-01-23 13:42:02 +01:00
set term ^;
create or alter package my_first_udr_kit
-- optional - declare sql security as DEFINER to give access rights of owner to all users
-- sql security definer
as
begin
function div (
anumerator integer, adenominator integer
)
returns ( AResult double precision);
function flagged (
flags integer, flag integer
)
returns integer;
end ^
recreate package body my_first_udr_kit
as
begin
function div (
anumerator integer, adenominator integer
)
returns ( AResult double precision)
external name 'udf_compat!UC_div!Divide param1 by param2' engine udr;
function flagged (
flags integer, flag integer
)
returns integer
external name 'my_first_udr_kit!MFK_flagged!What is this function intended for?' engine udr;
end ^
set term ;^