The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

 blx::xsdsql::xml::generic::sql_binding -  binding generator for blx::xsdsql::xml
 

SYNOPSIS

use blx::xsdsql::xml::generic::sql_binding

DESCRIPTION

this package is a class - instance it with the method new

FUNCTIONS

this module defined the followed functions

new - constructor

        PARAMS: 
                SEQUENCE_NAME   => sequence name for generate ID for insert  
                DB_CONN         => DBI instance
                DEBUG_NAME              => display name for debug - default 'undef_caller'
                DEBUG                   => enable debug
                EXECUTE_OBJECTS_PREFIX =>  prefix for objects in execution
                EXECUTE_OBJECTS_SUFFIX =>  suffix for objects in execution

get_connection - return the value of DB_CONN param

get_sth - return the handle of the prepared statement

get_clone - return the clone of the object

get_next_sequence - return the next value of SEQUENCE_NAME

        PARAMS: 
                SEQUENCE_NAME - sequence name for generate ID for insert (default the valiue of the same param in the constructor)
        this method is abstract because the algorithm  depend from database

bind_column - bind a value with a column

        the first argument is a column object generate from blx::xsdsql::parser::parse
        the second argument is a scalar

insert_binding - prepare a binding for a table

        the first argument is a table object generate from blx::xsdsql::parser::parse

        PARAMS:
                NO_PENDING_CHECK - not check for a pending execute
                NO_PK                    - not init the columns of the primary key
                 

delete_rows_for_id - delete a row of a table

        the first argument is a table object generate from blx::xsdsql::parser::parse
        the second argument is  a id value
        the method return  the number of rows deleted if id value exist else return undef

query_rows - return rows reading a table

        the first argument is a table object generate from blx::xsdsql::parser::parse
        the second argument is  a id value
        in scalar mode the method return a pointer of an array 
        in array mode  the method return an array

get_binding_table - return the binding table object

get_binding_columns - return the columns with a value binding

        in scalar mode the method return a pointer of an array
        in array mode  the method return an array

get_binding_values - return the values binding

        in scalar mode the method return a pointer of an array
        in array mode  the method return an array

execute - execute the current statement prepared

        the method return the self object

        PARAMS:
                NO_PENDING_CHECK - not check for a pending execute

is_execute_pending - return true if exits a prepared statement with binds but not executed

get_query_prepared - return the current query prepared

finish - close the prepared statements

        this method return the self object

EXPORT

None by default.

EXPORT_OK

        BINDING_TYPE_INSERT
        BINDING_TYPE_DELETE
        BINDING_TYPE_UPDATE
        BINDING_TYPE_QUERY_ROW

        :all

SEE ALSO

        DBI  - Database independent interface for Perl

AUTHOR

lorenzo.bellotti, <pauseblx@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by lorenzo.bellotti

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html