CREATE WRAPPER

Name

CREATE WRAPPER  --  define a new wrapper

Synopsis

CREATE WRAPPER wrapper ( init=function,
next=function,
done=function,
[rescan=function] )
[WITH WRAPPERINFO key=value, [...] ]  

Description

The CREATE WRAPPER command groups together the functions which implement data acquisition with other configuration information. A wrapper consists of an initialization function, a next function, a done function and possibly a rescan function. For more information on these functions, please see the Wrapper clearinghouse documentation.

Inputs

wrapper

The name of the wrapper.

init

the name of the initialization function. This function must have previously been declared using the CREATE FUNCTION command.

next

the name of the next function. This function must have previously been declared using the CREATE FUNCTION command.

done

the name of the done function. This function must have previously been declared using the CREATE FUNCTION command.

rescan

the name of the rescan function. This function must have previously been declared using the CREATE FUNCTION command.

WRAPPERINFO

Each wrapper can optionally have a set of key/value pairs associated with it which provide configuration information. these values should be entered as a comma separated list of key=value pairs.

Diagnostics

CREATE

Message returned if wrapper is successfully created.

ERROR

Message returned if wrapper creation failed.

Examples

Create a wrapper which will process CSV data

    CREATE WRAPPER mycsvwrapper (
    init=csv_init,
    next=csv_next,
    done=csv_done);
   

Compatibility

The CREATE WRAPPER is a TelegraphCQ extension and is not part of either SQL99 or SQL99. It is subject to change in future releases of TelegraphCQ.

See Also

DROP WRAPPER , ALTER STREAM