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

NAME

blx::xsdsql::schema_repository::sql::generic::binding - binding generator for blx::xsdsql::schema_repository::sql

SYNOPSIS

use blx::xsdsql::schema_repository::sql::generic::binding

DESCRIPTION

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

VERSION

0.10.0

FUNCTIONS

this module defined the followed functions

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 a unique number

    this method call _get_next_sequence abstract method because the algorithm  depend from database
    the attribute SEQUENCE_NAME must be set before call this method

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
        PK_ID_VALUE         - init the first column of the primary key with this value
                            if this param is not set the method get_next_sequence is used
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

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

query_from_view - return a result of a query

    ARGUMENT:

        view_name  - view name

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