2004-11-06 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.12.
* New code file versions are: Generic.pm v0.09, SQLBuilder.pm v0.12.
* Removed the temporary explicit external dependency on SQL::Routine v0.46.
* Updated external dependencies on Rosetta to v0.38 and on DBI to v1.45.
* The major change in this release is to the Rosetta_Extensions.t test
file, which was rewritten to invoke Rosetta::Validator; that module will
now handle the details of testing Rosetta::Engine::Generic and its
dependencies, as a common test suite for Engines. Currently, 5 tests are
run, of which 3 pass and 2 are skipped; Generic does not declare support
for the latter 2. Any further updates to Generic.pm will have
corresponding updates in Validator.pm, and/or likewise in the reverse.
* SQLBuilder.pm had no changes except for the dependency update.
* Generic.pm had those plus a few more changes: Renamed any SQL::Routine
calls on the set_parent_node_attribute_name() method to
set_pp_node_attribute_name(). Updated open_dbi_connection() to explicitly
use an empty-string $local_dsn if the given one is undefined; this avoids a
warning for driver types that legitimately use no DSN. Minor update to the
tracing output in build_perl_routine().
2004-10-30 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.11.
* New code file versions are: Generic.pm v0.08, SQLBuilder.pm v0.11.
* This is a snapshot release whose sole purpose is to maintain
compatability with SQL::Routine v0.46; most changes are in SQLBuilder.pm,
and a few are in Generic.pm; en.pm has no changes.
* Established a temporary explicit external dependency on SQL::Routine
v0.46, that will be removed in the next release. The external dependency
on Rosetta v0.37 was not incremented, since 'Rosetta' does not require any
compatability updates.
* These are the main relevant compatability changes (see the SQL::Routine
change log for more details): 1. A lot of SRT Node-ref attributes were
renamed to start with "pp_"; all of the changes to Generic.pm related to
this. 2. The 'view_type' enumerated list has been mostly changed. 3. The
new 'view_compound_elem' Node type is now used to specify the compound
query operands. 4. The 'domain' Node has been split up into
'scalar_data_type' and 'scalar_domain'. 5. There is now support for
several collection data types such as rows and arrays. 6. Table and view
primary column definitions are now handled by a row collection data type.
7. Attributes and variables with 'col' in their names now have 'field' in
their names instead; likewise, 'ind' was renamed to 'index'. 8. The 'view'
attribute 'match_all_cols' is gone; setting the view type to 'ALIAS' has
the same effect, but the build_query_select_list() code is a lot simpler.
9. The SELECT and INSERT statements are now defined to fetch or store
entire rows as single units, from and to row variables. 10. Each view
source can be an arg or var, not just a table or view; larger update to
build_query_query_expr_body() to handle this.
* Renamed SQLBuilder.pm method build_expr_data_type_or_domain_name() to
build_expr_scalar_data_type_or_domain_name().
* The separate build_identifier_fake_view_src_col() method is gone, with
its functionality now built in to build_identifier_view_src_field().
* Added new utility method find_scalar_domain_for_row_domain_field().
* Minor documentation updates in Extensions.pod.
2004-10-26 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.10.
* New code file versions are: Generic.pm v0.07, SQLBuilder.pm v0.10.
* This is a major release, with multiple significant design, code, and
documentation updates, mostly in Generic.pm, and also in SQLBuilder.pm.
The externally visible end-to-end functionality hasn't changed (you can get
a list of databases and open or close connections, and that's it); only the
implementations of how to do this has changed.
* Updated external dependencies on Rosetta to v0.37.
* Corresponding to changes in SQL::Routine (v0.44, v0.45) and the Rosetta
core (v0.37), about 2/3 of the code in Generic.pm was rewritten; the file
is also about 1/3 larger. See the change logs of those dependent releases
to explain most of the rewrites. The main relevant changes are: 1.
'command' SRT Nodes no longer exist; their functionality is replaced by the
built-in standard routines that can be called by user-defined routines;
prepare() now only takes a 'routine' SRT Node as its argument. 2. All
built-in routines now take named arguments just like user-defined routines.
User-defined 'routine' Nodes now can have child 'routine_context' Nodes
that are used like an argument but aren't. 3. 'Connection'/CONN and
'Cursor'/CURSOR Interfaces/context-types are now directly referenceable in
user-defined routines, and those Interfaces are now created by declaring a
routine variable of their type; they also no longer implicitly represent an
'open' connection/cursor by their existence; you open/close them explicitly
using appropriate open|close() built-in routines, and you can do that more
than once; Connection.features() now can return different answers depending
on whether the Connection is closed or open. 4. A new public routine
routine_source_code() must be implemented. 5. Four existing public
routines, specific to working with open cursors, must be removed or
privatized as appropriate; users invoke appropriate built-ins from their
u-d routines instead. 6. The names of the Interface types are now public
'our' declarations in Rosetta.pm, so we can refer to them in our code
rather than re-declaring them. 7. Any occurances of "login user" were
renamed to "login name". 8. prepare() can be invoked off of 3 Interface
types: Environment, Connection, Cursor. 9. Renamed a couple of Rosetta
features from DB_* to CATALOG_*.
* In Generic.pm, the main routine that prepare() builds is now done as a
string of Perl code, that is later eval'd to produce a CODE ("sub {}") ref,
rather than having bare Perl code that does the same, as old 'command'
specific handlers did (for exactly 2 commands).
* The newly built Perl routine code generated from SRT routines are output
through the Rosetta tracing file-handle, if it is present.
* In Generic.pm, added 4 new class properties: in_progress_prep_eng,
env_perl_rtns, env_perl_rtn_strs, conn_is_open. Also, the nature of the 3
pre-existing 'Connection' properties (conn_eco, conn_dbh_obj,
conn_sql_builder) has changed so they are only valued when the Connection
is in the 'open' state.
* In Generic.pm, support for the two TRAN_MULTI_* features are now
explicitly declared to be 'no'.
* For historical posterity, this is the current list of Generic.pm methods:
_throw_error_message(), new(), destroy(), DESTROY(), features(), prepare(),
payload(), routine_source_code(), build_perl_routine(),
build_perl_routine_body(), build_perl_stmt(), build_perl_stmt_srtn(),
build_perl_stmt_urtn(), build_perl_expr(), build_perl_expr_srtn(),
build_perl_expr_urtn(), get_env_cx_e_and_i(), get_conn_cx_e_and_i(),
get_curs_cx_e_and_i(), encode_perl_identifier(),
build_perl_identifier_element(), build_perl_identifier_rtn(),
build_perl_identifier_rtn_var(), encode_perl_literal_cstr(),
build_perl_literal_cstr_from_atvl(), open_dbi_connection(),
close_dbi_connection(), clean_up_dbi_driver_string(), install_dbi_driver(),
make_srt_node(), make_child_srt_node(), build_perl_declare_cx_conn(),
srtn_catalog_list(), srtn_catalog_open(), srtn_catalog_close().
* Note that the SYNOPSIS in Generic.pm is now out of date, and wrong. It
will be fixed later.
* Fixed bugs in the quote_[bin|hex]_string_literal() functions of
SQLBuilder.pm, so that each one encodes the whole input string and not just
the first 4 bytes.
* Renamed methods in SQLBuilder.pm as follows: build_expr_call_[s|u]func()
-> build_expr_call_[s|u]routine(), build_dmanip_call_[s|u]proc() ->
build_dmanip_call_[s|u]routine(). Similar variable name changes inside.
* In accordance with recent SQL::Routine changes, rewrote large parts of
the following SQLBuilder methods: build_expr(), build_expr_cast_spec(),
build_expr_call_sroutine(), build_dmanip_routine_body(),
build_dmanip_routine_stmt(), build_dmanip_call_sroutine(). Also renamed a
number of references to SRT Node attributes in other methods.
* Replaced all documentation occurances of "SQL-2003" with "SQL:2003".
* Updated all code that referenced module version numbers so that those
numbers are now quoted in strings rather than being bare numbers. In the
*.pm files, this affected only the "use" strings, since each $VERSION was
already declared as a string. In the *.t files, the "use" strings. In the
Makefile.PL, each PREREQ_PM item was updated.
2004-10-04 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.09.
* New code file versions are: SQLBuilder.pm v0.09, Generic.pm v0.06, en.pm
v0.06.
* Updated external dependencies on Rosetta to v0.36 and on DBI to v1.43.
* Renamed all references on SQL::SyntaxModel in code and documentation to
SQL::Routine. All name-related strings, both in code and documentation,
were updated as follows: "SyntaxModel" -> "Routine", "SSM" -> "SRT", "ssm"
-> "srt". Most renaming was done in Generic.pm and SQLBuilder.pm.
* Updated the make[_child]_srt_node() methods in Generic.pm to remove the
calls to add_reciprocal_links(), that method no longer exists in
SQL::Routine (it isn't needed); removed 2 refs in the SYNOPSIS also.
* Updated the SYNOPSIS in Generic.pm, including a whitespace bug fix.
2004-09-09 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.08.
* New code file versions are: SQLBuilder.pm v0.08, Generic.pm v0.05, en.pm
v0.05.
* Updated all versioned *.pm files to use the modern syntax "our $VERSION =
..." instead of "use vars qw($VERSION); $VERSION = ...".
* From now on, any modules that have 'Rosetta' as an explicit dependency
will also have implicit dependencies on the same versions of
[SQL::SyntaxModel, Locale::KeyedText] that Rosetta explicitly depends on;
the explicit dependencies on those two modules are now gone. If either of
the two modules are updated and a Rosetta-using module requires a newer
version, then that module should simply update its requirement to a version
of Rosetta that itself requires the implicit dependency.
* Updated external dependencies on Rosetta to v0.35.
* Renamed these methods in SQLBuilder.pm: positional_bind_vars() =>
positional_host_params(), make_bind_vars() => make_host_params(),
[get|clear]_positional_bind_var_map_array =>
[get|clear]_positional_host_param_map_array(). Also renamed the
corresponding 3 class properties. Also renamed all documentation
references of "bind variables" to "host parameters", since that is the
official name for them in the SQL:2003 standard.
* In SQLBuilder.pm, split off new method from build_expr() named
build_identifier_host_parameter_name(), which handles the 'ARG' case. Also
added some code documentation to quote_identifier().
* Updated/simplified the build_query_into_clause() method in SQLBuilder.pm
to account for recent changes in SQL::SyntaxModel where relevant details
are stored in view_col Nodes rather than view_expr Nodes.
* Added some code docs to SQLBuilder.build_schema_table_create().
* Updated the build_schema_routine_create() method in SQLBuilder.pm to
account for recent changes in SQL::SyntaxModel regarding TRIGGER routines
where [table,view] attrs renamed to [trigger_on_table,trigger_on_view].
* Updated SQLBuilder.pm documentation and comments to either remove any
references to an ANONYMOUS routine_type (no longer exists), or replace them
with "application-side routine".
* Updated the build_dmanip_call_uproc() method in SQLBuilder.pm to account
for recent changes in SQL::SyntaxModel where the routine_expr attribute
'call_uproc_arg' is used for uprocs instead of overloaded 'call_ufunc_arg'.
* Changed each reference on the SSM 'command' Node attribute
'command_arg_1' to a reference on that Node's child 'command_arg' Node.
* Updated Generic.pm so that the DB_LIST command now produces more useful
results, and so that the DB_OPEN command now consults the
catalog_instance[_opt] attributes that correspond to the used catalog_link,
and so that any thrown exceptions include the class name as an argument.
* Rewrote the top half of the TODO file so it is more accurate concerning
my development road map.
2004-08-16 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.07.
* New code file versions are: SQLBuilder.pm v0.07, Generic.pm v0.04, en.pm
v0.04.
* Updated external dependencies on SQL::SyntaxModel to v0.38 and on Rosetta
to v0.33 and on DBI to v1.42. There was previously no minimum version of
DBI specified. I chose v1.42 somewhat arbitrarily, because it is the
relatively new (5 months old, 1 release behind) version that I am currently
testing with; if you really want to stay with an older version than that,
you are welcome to edit my "use" statements to a lower number and test your
luck. From now on, I will not explicitly raise the required version number
unless I can see a change that visibly affects this distribution or me.
* Changed the first line of every file's COPYRIGHT AND LICENSE from "...
Rosetta database abstraction framework" to "... Rosetta::Extensions
collection of Rosetta feature reference implementations". Every other
occurance of 'Rosetta' in the copyright/license was changed to
'Rosetta::Extensions'. Following this, all files in the Rosetta-Extensions
distribution now have a different copyright than the core Rosetta distro.
* Replaced Generic.pm's 3 object properties with 7 different ones; each new
property will only be set for Generic objects behind a specific type of
Interface. Simplified the destructor code as it is now trivial to find out
what kind of Interface an object is behind, in DESTROY(). Rewrote parts of
prepare_cmd_db_open() around the new property list.
* Renamed the get_supported_features() method of Generic.pm to features()
and re-positioned it to be above prepare(). This function can now be
called off of both Environments and Connections. Fleshed out the list of
feature declarations, in both code and docs, to include every possible
feature, each with a 'yes' or 'no'. Eliminated the separate
get_static_const_supported_features() method. Split the SUPPORTED ROSETTA
FEATURES docs into ROSETTA FEATURES SUPPORTED [BY ENVIRONMENT|PER
CONNECTION]. Rewrote first ENGINE CONFIGURATION OPTIONS paragraph.
* Merged the module GenericAC.pm into Generic.pm as the reasons for it to
exist separately no longer exist. Added new boolean option to Generic.pm's
ENGINE CONFIGURATION OPTIONS list named "auto_commit", whose default value
is false (matching the old Generic's transactional behaviour); if you set
this to true, then this module will behave like the old GenericAC. The
separate get_static_const_use_auto_commit() method is now gone. Removed
last DESCRIPTION paragraph.
2004-08-06 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.06.
* Updated external dependencies on Locale::KeyedText to v0.06 and on
SQL::SyntaxModel to v0.24 and on Rosetta to v0.16.
* Renamed Rosetta::Engine::L::en to Rosetta::Engine::Generic::L::en (now
v0.03); it now only contains extra messages that are specific to Generic;
general database messages are now stored in Rosetta::L::en. Also, the
remaining 2 (from 6) user text now are prefixed by the class name, so it is
easier for users to know what file generated any error messages.
* Multiple updates to SQLBuilder.pm (now v0.06) and Generic.pm (now v0.03);
Generic.pm had almost all of the changes.
* Fixed POD bug in SQLBuilder.pm where the build_dmanip_call_[s|u]proc()
methods were called build_expr_call_[s|u]proc() by mistake.
* Added new payload() method and 'payload' property to Generic.pm. Also
added new get_supported_features() method.
* Added these new Generic.pm internal methods: DESTROY(), open_dbi_connection(),
close_dbi_connection(), make_ssm_node(), make_child_ssm_node(),
prepare_cmd_db_list(), prepare_cmd_db_info() (empty). Deleted these internal
methods: dbi_driver_req_autocommit().
* Renamed a lot of the local variables in Generic.pm to be a lot more
consistent, descriptive, and scalable, meaning the code is now a lot easier
to read and understand. For example, any SSM Node objects now end in
'_node', any Interface objects end in '_intf', any Engine objects in
'_eng', any "preparation" interfaces or engines have '_prep' in the middle.
As an exception, for the few generic functions that can take many kinds of
intfs/engs rather than one specific kind, the variables are simply called
$interface or $preparation and $engine as before.
* Added new SUPPORTED ROSETTA FEATURES documentation section to Generic.pm,
expanded its DESCRIPTION, and brought the SYNOPSIS up to date with recent
changes to SQL::SyntaxModel.
* Added new static Generic methods get_static_const_use_auto_commit() and
get_static_const_supported_features() that should be easy for sub-classes
to override (see GenericAC, which does just that).
* Added new module Rosetta::Engine::GenericAC (v0.01) which sub-classes
Generic and should be used for database products that lack native support
for transactions; Generic won't even try to emulate them, but will declare
support for them; GenericAC will not declare support, and auto-commits.
* Several other bug fixes and changes were made in Rosetta.pm.
* For the first time, with this release, most of the Generic.pm code has
now been exercised and tested, in combination with external code, and is
now found to be working to spec. Tests included successful runs of
DB_LIST, DB_OPEN, DB_CLOSE, and likewise against GenericAC.pm.
2004-07-03 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.05.
* Updated external dependencies on Locale::KeyedText to v0.04 and on
SQL::SyntaxModel to v0.22. Note that the Makefile.pl in release 0.04
mistakenly said that Locale::KeyedText 0.04 was a prerequisite, but that
wasn't true until now.
* Updated SQLBuilder.pm (now v0.05) extensively such that about 15% of the
module was added or changed. The most extensive change concerns its POD
documentation, as now 100% of the module's methods are documented;
previously, less than half of them were. Added 1 new state maintenance
property plus its accessor method. A few methods were re-ordered and/or
re-named. Rebuilt the methods for making INSERT, UPDATE, DELETE statements
so they should now actually appear to work. Literals are now escaped
according to their type. Now all Perl switch statement options are
explicitely specified rather than the last one going in 'else'; this is
meant to prevent bugs in the future caused by the addition of new options
to SQL::SyntaxModel. build_dmanip_into_clause() was renamed to
build_query_into_clause() and merged into the generic query function list.
build_dmanip_stmt_table_or_view_name() was converted to
build_dmanip_src_schema_object_name(). build_expr_call_cview() was merged
into build_query_subquery(). Split build_dmanip_call_sproc() into itself
plus build_dmanip_[insert|update|delete]_stmt(); build_dmanip_set_clause()
was merged into the latter, and build_query_table_value_constr() was merged
into 'insert'. A few other small code updates. All methods now have
SQL:2003 section/page references, where applicable.
2004-06-21 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.04.
* Updated external dependencies on SQL::SyntaxModel to v0.21.
* Updated SQLBuilder.pm (now v0.04) extensively such that about 30% of the
module was added or rewritten. Added 8 new SQLBuilder properties, with 6
being for general configuration, and 2 for short term state maintenance.
Renamed build_expr_identifier_element() to build_identifier_element() and
split build_expr_identifier_chain() into 4 more specialized
build_identifier_*() methods. Further added or updated SQL generation code
corresponding to these sections of "SQL:2003 Foundation": 6 "Scalar
expressions", 7 "Query expressions", 11 "Schema definition and
manipulation", 14 "Data manipulation". All of the above concerned code
changes. Some documentation changes, mostly in the method list; most
methods are still not documented. Following these changes, all of the
existing methods in SQLBuilder are now "implemented" (no more empty methods
with 'to be done' comments); however, many of them stand to be updated
later with new or corrected features. A few empty methods were removed.
2004-05-12 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.03.
* Updated external dependencies on SQL::SyntaxModel to v0.18.
* Updated SQLBuilder.pm (now v0.03) extensively such that about 20% of the
module was added or rewritten. Added a base property and renamed another.
Added or updated SQL generation code corresponding to these sections of
"SQL:2003 Foundation": 7 "Query expressions", 11 "Schema definition and
manipulation", 12 "Access control", 14 "Data manipulation". All of the
above concerned code changes. Documentation was added/changed for the
new/altered property accessors only.
2004-05-01 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.02.
* This is a "middle of development" release that includes a large number of
changes, some of which are only partially implemented. It exists largely
so that I can have a reliable backup for (and historical record of) the
last 3 weeks of in-progress work. It compiles, but there are large gaps.
* Updated external dependencies on SQL::SyntaxModel to v0.17.
* Updated all relevant documentation, including the NAME of Extensions.pod,
to specify that the modules herein are "reference implementations of
fundamental Rosetta features". That is, they are not meant to be the best
or only implementations, but rather just examples of how the deed is done.
* Updated documentation to say that the SQL:2003 standard is now the focus
of influence rather than SQL:1999 (or SQL:1992).
* Updated SQLBuilder.pm (now v0.02) extensively such that over 70% of the
module was added or rewritten; probably 98%+ of all changes for this
distribution release were in this module. Most existing properties and
methods were renamed and/or reordered. Added 2 base properties and 4 'data
types' sub-properties. The 'data types' sub-property defaults are now more
standard-centric rather than MySQL centric; said sub-properties can now
contain substitution variables. Implemented most of the SQL generation
code corresponding to these sections of "SQL:2003 Foundation": 5 "Lexical
elements", 6 "Scalar expressions", 7 "Query expressions", 8 "Predicates",
11 "Schema definition and manipulation". All of the above concerned code
changes. For documentation, there were no descriptions for individual
functions/methods in 0.01, but now there are for about a third of them.
* Updated Generic.pm (now v0.02) so that the "engine configuration option"
named "insen_ident" (case-insensitive identifiers) was renamed to
"delim_ident" (delimited identifiers); rewrote that option's description.
* Updated en.pm (now v0.02) to add a "ROS_G_RAW_SQLSTATE" message.
2004-04-10 Darren Duncan <perl@DarrenDuncan.net>
* Release 0.01.
* This is the first release of the Rosetta-Extensions distribution. This
distribution is meant to be temporary, collecting a number of related
modules during their infancy, as they tend to be updated in tandem; said
modules will get split into their own distributions later when they
stabilize. This release features the first versions of the modules
Rosetta::Engine::Generic and Rosetta::Utility::SQLBuilder (plus the
placeholder Rosetta::Extensions and the localization file
Rosetta::Engine::L::en). These modules are mostly code complete such that
you can connect to or disconnect from databases, as well as create or
remove tables and sequences in a database. None of this functionality was
tested, though (except for compiling); that is planned for release 0.03.
* For more background information, see the "Rosetta" distribution and
everything of mine that it references.