José Diaz Seng > DBIx-Table-TestDataGenerator-0.005 > DBIx::Table::TestDataGenerator::Query

Download:
DBIx-Table-TestDataGenerator-0.005.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.005   Source  

NAME ^

DBIx::Table::TestDataGenerator::Query - query database and handle SQL commands

DESCRIPTION ^

The class provides methods querying the target database for data and the ones handling SQL commands (indirectly via DBIx::Class modules).

SUBROUTINES/METHODS ^

num_records

Arguments:

Returns the number of records in the target table.

max_value

Arguments:

Returns the maximum value of the passed in column.

max_length

Arguments:

Returns the maximum length of the passed in column.

insert_statement

Arguments:

Returns a string defining a parametrized insert statement for the target table.

prepare_insert

Arguments:

Prepares an insert statement.

execute_insert

Arguments:

Executes an insert statement.

execute_new_row

Arguments:

Adds a new row to the target table. Is used in case we have an auto-increment column, there is a self-reference and the root nodes are identified by having "pkey = referenced pkey". In this case, we need to know the value of the auto-increment column for the new record and this can easily be determined from the DBIx::Class::Row object itself. For performance reasons, we don't use Row objects for the other inserts, in those cases, we use plain DBI.

commit

Argument: DBI database handle.

Executes a commit.

disconnect

Argument: DBI database handle.

Disconnects from the target database.

AUTHOR ^

Jose Diaz Seng, <josediazseng at gmx.de>

COPYRIGHT AND LICENSE ^

Copyright (C) 2012-2013, Jose Diaz Seng.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

syntax highlighting: