NAME

DBIx::SQLEngine::Docs::ToDo - Tasks, ideas, and bugs

TO DO

There are a number of things that could be done to improve this module.

Internals

Centralize logging interface by making 'DBI', 'SQL' arguments to general function.

Distribution

The test script is fairly minimal and really ought to exercise much more of the public interface. Specific things to add to the test include:

- Test for inserting, updating and selecting nulls, including "is null" test.

- Test new transaction code.

Columns

The column-information retrieve in DBIx::SQLEngine::Default should be using DBI's type_info methods.

Helper Classes

Consider blessing the column info hashes into new Column and ColumnSet classes.

Proposed Array Select interface

# ( $row_arrays, $column_hashes ) = $self->fetch_rows( %clauses );

// Also visit_rows, fetch_named_query_rows... [?]

Pre-defined Query Library

Proposed "Named Query" interface:

# $sqldb->define_named_query( name , string_or_sub ) // or return current

# %clauses = $sqldb->prepare_named_query( name, args ) // with conversion, recursion

# ( $row_hashes, $column_hashes ) = $sqldb->fetch_named_query( name, args )

# @results = $sqldb->visit_named_query( code, name, args )

# $result = $sqldb->do_named_query( name, args )

Additional Criteria

The Criteria subclasses are woefully incomplete. Candidates include:

package DBO::Criteria::SubString;
package DBO::Criteria::CaseInsensitiveSubString;
package DBO::Criteria::NumericEquality;
package DBO::Criteria::NumericInequality;
package DBO::Criteria::StringInequality;

Consider enabling pure-Perl interpretation of criteria:

package DBO::Criteria::Equality;

sub inverse { 'DBO::Criteria::Inequality' }

# $flag = $crit->matches( $record );
sub matches {
  my ($crit, $record) = @_;
  return ($crit->value( $record ) eq $crit->{'value'}) ? 1 : 0;
}

Future Database-specific Functionality

Additional subclass logic will be required to support the following:

  • Oracle: single, trailing long.

  • MySQL, Oracle: downcase column names.

  • DB2: Long insertion via multiple updates.

  • Informix: escape newlines on insert/update/where and select

SEE ALSO

DBIx::SQLEngine::ReadMe