2005-06-01   Darren Duncan <[EMAIL PROTECTED]>
--------------------------------------------------

Version 0.63 of SQL::Routine (SRT), a fully atomic and portable abstract syntax tree to define any database tasks, has been uploaded to CPAN; it should appear on your favorite mirror within the next few hours.

http://search.cpan.org/dist/SQL-Routine/

In summary, this release primarily serves to improve the ease of use and reliability of the build_*() methods, such that their allowed argument options are now more consistent and predictable. The allowed argument formats are now more terse and user-friendly than before. The get_all_properties() methods will now return the more terse format as well. Finally, the number of static error messages has been greatly reduced, replaced with a much smaller number of dynamic ones, so the total is easier to work with.

A side effect of the build_*() method changes is that subsequent porting of this module to Perl 6 will be easier, as I remove the need for a multitude of multi-methods.

Aside from the build_*() methods being more restrictive, there are no other significant API changes. Moreover, if you used the build_*() methods in the manner that the SYNOPSIS detailed, then nothing will break at all. The verbose API (doing everything without 'build') is also unchanged.

This input example worked before and still works now:

  $schema->build_child_node_tree( 'table',
      { 'si_name' => 'person', 'row_data_type' => 'person', }, [
    ( map { [ 'table_field', $_ ] } (
{ 'si_row_field' => 'person_id', 'mandatory' => 1, 'default_val' => 1, 'auto_inc' => 1, },
      { 'si_row_field' => 'name'     , 'mandatory' => 1, },
    ) ),
    ( map { [ 'table_index', $_->[0],
        [ [ 'table_index_field', $_->[1] ] ] ] } (
[ { 'si_name' => 'primary' , 'index_type' => 'UNIQUE', }, 'person_id' ], [ { 'si_name' => 'ak_alternate_id', 'index_type' => 'UNIQUE', }, 'alternate_id' ], [ { 'si_name' => 'fk_father', 'index_type' => 'FOREIGN', 'f_table' => 'person', },
        { 'si_field' => 'father_id', 'f_field' => 'person_id' } ],
[ { 'si_name' => 'fk_mother', 'index_type' => 'FOREIGN', 'f_table' => 'person', },
        { 'si_field' => 'mother_id', 'f_field' => 'person_id' } ],
    ) ),
  ] );

This otherwise identical example used to work and now doesn't:

  $schema->build_child_node_tree( { 'NODE_TYPE' => 'table',
'ATTRS' => { 'si_name' => 'person', 'row_data_type' => 'person', }, 'CHILDREN' => [
    ( map { { 'NODE_TYPE' => 'table_field', 'ATTRS' => $_ } } (
{ 'si_row_field' => 'person_id', 'mandatory' => 1, 'default_val' => 1, 'auto_inc' => 1, },
      { 'si_row_field' => 'name'     , 'mandatory' => 1, },
    ) ),
    ( map { { 'NODE_TYPE' => 'table_index', 'ATTRS' => $_->[0],
'CHILDREN' => { 'NODE_TYPE' => 'table_index_field', 'ATTRS' => $_->[1] } } } ( [ { 'si_name' => 'primary' , 'index_type' => 'UNIQUE', }, 'person_id' ], [ { 'si_name' => 'ak_alternate_id', 'index_type' => 'UNIQUE', }, 'alternate_id' ], [ { 'si_name' => 'fk_father', 'index_type' => 'FOREIGN', 'f_table' => 'person', },
        { 'si_field' => 'father_id', 'f_field' => 'person_id' } ],
[ { 'si_name' => 'fk_mother', 'index_type' => 'FOREIGN', 'f_table' => 'person', },
        { 'si_field' => 'mother_id', 'f_field' => 'person_id' } ],
    ) ),
  ] } );

That summarizes the most significant API changes.

The Changes file for this release contains a lot more details than are shown in this announcement email; the Changes does not contain any before/after code, however.

Any questions, feedback, requests, or offers of assistence with the module are welcome and appreciated.

Thank you and have a good day. -- Darren Duncan

Reply via email to