=head1 NAME

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


=head1 TO DO

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


=head2 Internals

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


=head2 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.


=head2 Columns

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


=head2 Helper Classes

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


=head2 Proposed Array Select interface

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

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


=head2 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 )



=head2 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;
  }


=head2 Future Database-specific Functionality

Additional subclass logic will be required to support the following:

=over 4

=item *

Oracle: single, trailing long.

=item *

MySQL, Oracle: downcase column names.

=item *

DB2: Long insertion via multiple updates.

=item *

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

=back

=cut


=head1 SEE ALSO 

L<DBIx::SQLEngine::ReadMe>

=cut
