toxic – Embed PL/SQL in XIST XML
This module is an XIST namespace. It provides the processing instruction classes
needed to create TOXIC functions and procedures via XIST. For more info about
the TOXIC compiler see the module ll.toxicc.
- class ll.xist.ns.toxic.args[source]
Bases:
ProcInstSpecifies the arguments to be used by the generated function. For example:
<?args key in integer, lang in varchar2 ?>for Oracle, or:
<?args @key int, @lang varchar(10) ?>for SQL Server. If
argsis used multiple times, the contents will be concatenated with a,in between.
- class ll.xist.ns.toxic.vars[source]
Bases:
ProcInstSpecifies the local variables to be used by the function. For example:
<?vars buffer varchar2(200) := 'foo'; counter integer; ?>for Oracle, or:
<?vars declare @buffer varchar(200) := 'foo'; declare @counter int; ?>If
varsis used multiple times, the contents will simple be concatenated. (Note that for SQL Server this could be done via a normalcodePI too.)
- class ll.xist.ns.toxic.code[source]
Bases:
ProcInstA SQL code fragment that will be embedded literally in the generated function. For example:
<?code select user into v_user from dual;?>
for Oracle, or:
<?code set @user = user;?>
for SQL Server
- class ll.xist.ns.toxic.expr[source]
Bases:
ProcInstThe data of an
exprprocessing instruction must contain a SQL expression whose value will be embedded in the string returned by the generated function. This value will not be escaped in any way, so you can generate XML tags withexprPIs but you must make sure to generate the value in the encoding that the caller of the generated function expects.
- class ll.xist.ns.toxic.proc[source]
Bases:
ProcInstWhen this processing instruction is found in the source
compile()will not generate a function as a result, but a procedure. This procedure must havec_outas an “out” variable (of the appropriate type (seetype) where the output will be written to.