Genezzo::Havok::UserFunctions is a Perl module to load the user_functions table.
SYNOPSIS
# don't say "use Genezzo::Havok::UserFunctions". Update the
# dictionary havok table:
select HavokUse('Genezzo::Havok::UserFunctions') from dual;
NOTE: this module replaces Genezzo::Havok::UserExtend.
The module Genezzo::XEval::Prepare constructs a function call interface based upon information from the user_functions table:
create table user_functions ( xid number, xtype char, xname char, args char, owner char, creationdate char, version char, argstyle char, sqlname char, typecheck char );
xid - a unique id number
xtype - the string "require" or "function"
xname - if xtype = "require", then xname is a package name, like "Text::Soundex". if xtype = "function", xname is a function name. A function name may be qualified with a package.
args - if xtype = "require", an (optional) blank-separated list of functions to import to the default Genezzo namespace. if xtype = "function", supply an actual function body in curly braces.
owner - owner of the package or function
creationdate - date row was created
version
argstyle - if set to HASH, pass a hash of the dictionary, the dbh, and the array ref function_args, else the function is just passed an array of the function arguments.
sqlname - currently UNUSED. Will be used to distinguish the perl function name from the SQL function name
typecheck - currently UNUSED. Will be used to distinguish a supplied type-checking function from a purely SQL execution function.
Example:
insert into user_functions values (1, 'require', 'Genezzo::Havok::Examples', 'isRedGreen', 'SYSTEM', '2004-09-21T12:12');
The row causes UserFunctions to "require Genezzo::Havok::Examples", and it imports "isRedGreen" into the default Genezzo namespace* (actually, it creates a stub function that calls Genezzo::Havok::Examples::isRedGreen").
An easier method is to use add_user_function, which is defined in Genezzo::Havok::Utils. The equivalent command to load the isRedGreen function is:
select
add_user_function(
'module=Genezzo::Havok::Examples',
'function=isRedGreen')
from dual;
Product's homepage
Requirements:
· Perl