Creating User-Defined Functions


 cx.create_function(name, argc, func) 

Registers a user-defined function called name in SQL using the Python function func. The number of arguments to the function is given in argc.

 cx.create_aggregate(name, argc, aggregate) 

Registers a user-defined aggregating function called name in SQL using the Python class aggregate, which must contain the member functions reset(), step(), and finalize().



    SQLite
    SQLite
    ISBN: 067232685X
    EAN: 2147483647
    Year: 2004
    Pages: 118
    Authors: Chris Newman

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net