0.10 2003-12-26
- Initial version.
0.20 2004-01-03
- Added SQL::Interpolate::Filter module for source filtering
with string-like sql// operator.
- Added DBIx::Interpolate module. (thanks jim c)
- Added SQL::Interpolate::SQL module.
- Support macro calls inside SQL (e.g. LIMIT macro).
- Renamed sql_interpolate and dbi_interpolate to sql_interp
and dbi_interp respectively (thanks terrence).
- Changed SQL::Interpolate to not export symbols by default.
- Limited cross-database support for LIMIT clauses.
0.29 2004-12-25
### SQL::Interpolate features
- Added support for ("IN", $scalarref) (thanks mark s)
- Added support for ("INSERT INTO mytable", $scalarref)
- Added support for ("INSERT INTO mytable", $arrayref)
- Added support for ("WHERE {x = 3, y = 4}")
- Added support for ("INSERT HIGH_PRIORITY DELAYED INTO mytable", $ref)
for mysql.
- Added simplified syntax for table joins using
R(...) and LINK(...) macros via new method filter_sql().
- Added OO-interface in addition to the functional one.
- Added support for \%attr to be returned by dbi_interp()
and sent to DBI when new SQL::Intepolate::Attr object is given.
This object may be created by new attr() function.
- Added support for extra $key_field to be returned by
dbi_interp() when instance of new SQL::Interpolate::Key object
is given. This object may be created by new attr() function.
This is for using in DBI::selectall_hashref and similar methods.
- Added exports:
attr, dbi_interp, select_key, limit, make_sql_interp,
make_dbi_interp, filter_sql, sql_flatten, limit
- Added debugging options in use statement: TRACE_SQL, TRACE_FILTER.
- Changed: less extra whitespace around SQL generated by sql_interp().
- Changed: In limit(), for mysql, don't use bind values since they
don't always work right.
- Changed: In limit(), for mysql, $start and/or $count may be undef.
### SQL::Interpolate internal changes
- Dereferencing extra reference that source filtering produces from
sql[$x] when $x is an arrayref or hashref is now performed more
immediately in SQL::Interpolate::SQL::new() rather than sql_interp().
- new SQL::Interpolate::Limit extends SQL::Interpolate::Macro.
- Moved SQL::Interpolate::SQL into SQL::Interpolate
- Fixed some documentation (thanks mark s)
- Added more tests, more complete docs
### DBIx::Interpolate features
- Added new() method in addition to connect() to attach existing
database handle (thanks mark s)
- Added dbh() and interp() methods to expose underlying DBI and
SQL::Interpolate objects.
0.30 2005-01-10
## General
- Refactored SQL::Interpolate module into multiple modules.
Everything except sql_interp-related functionality
moved out of SQL::Interpolate and into DBIx::Interpolate,
SQL::Interpolate::Filter, and SQL::Interpolate::Macro (new module).
(recommended by mark s)
- Reorganized macro processing. SQL::Interpolate contains
only hooks for macro processing, and SQL::Interpolate::Macro
implements various macros.
## SQL::Interpolate
- added sql_var type
- added sql_literal type (thanks mark s)
- ("WHERE x in", []) now generates "WHERE 1" not "WHERE NULL"
- croak not die
- macros, sql_var, and sql_literal can now exist in
elements of aggregates (hashref and arrayref)
## DBIx::Interpolate
- DBIx::Interpolate is now derived from SQL::Interpolate.
- Support for statement handle sets (stx/prepare).
- Renamed select_key() to key_field().
## SQL::Interpolate::Macro
- SQL::Interpolate::SQL is now a macro for uniformity.
- new macros: relations, sql_and, sql_fragment, sql_if,
sql_link, sql_or, sql_paren, sql_rel
- removed limit() macro since MySQL supports Postgres syntax.
(thanks mark s)
## Other
- reorganized POD (thanks mark s)
- reorganized test cases
0.31 2005-09-27
## SQL::Interpolate
- Improved error reporting by sql_interp
(recommended by mark stosberg)
- Added support for ("WHERE", {x => \@v, ...})
==> "WHERE (x IN (?,...) AND ...)".
(recommended by multiple people)
- Generate 'WHERE id = 5 and 1=1' and 'WHERE id = 5 or 1=0'
rather than 'WHERE id = 5 and 1' and 'WHERE id = 5 or 0'
for Oracle compatibility.
(reported by wojciech pietron)
- Fixed some improper handling of "use"
parameters, e.g. $x in "use SQL::Interpolate FILTER=>$x"
- Fixed various Exporter problems from custom import
(reported by mark stosberg)
- sql_interp.t and dbi.t - Fixed test case errors due to
different hash order on MacOS.
(reported by sean davis)
- Documentation improvements.
## SQL::Interpolate::Macro
- Fixed: '^' and '$' are no longer
automatically placed around regexes in 'relations' parameter.
(reported by wojciech pietron)
## DBIx::Interpolate
- Added support for transparent
caching of statement handles (no need to prepare()).
- Fixed error in STX::fetchrow_hashref returning an
arrayref rather than a hashref.
(reported by mark tiefenbruck)
- Added Carp
0.32 2005-11-05
## SQL::Interpolate
This module has simplified, and it incorporates defect
corrections and style improvements.
- Fixed ("x IN", []) to return "1=0" not "1=1".
- Fixed ("x in", \@v) to not fail when "in" lowercase.
- Fixed sql_interp.t on some platforms
(perl.cpan.testers, 254029)
- Fixed sub-module version numbers for CPAN.
- New sql() function (based on SQL::Interpolate::SQL
from Macro.pm). sql_literal() is now depreciated
in favor of sql().
- sql_interp() now handles recursion correctly.
- sql_flatten() moved into SQL::Interpolate::Macro.
- Added pod.t - Test::Pod checks
- Added pod-coverage.t - Test::Pod::Coverage checks
- Added dist.t - distribution checks
- POD and code style improvements.
## DBIx::Interpolate
- Removed AUTOLOAD usage.
## SQL::Macro
The macro framework has been refined.
- Fixed sql_and(sql()) and sql_or(sql()) to
now return '1=1' and '1=0' respectively (rather than "()").
- sql_flatten() now expands depth-first rather than
breadth-first.
- sql_fragment() is now depreciated. Use sql() instead.
- relations() is now depreciated. Use sql_rel_filter() instead.
- expand() no longer has $filter param. Macros now
query the $interp object for state.
- SQLFilter::macro_names() no longer used. The $interp
object no longer knows which macro object use which filters.
- SQLFilter::filter_text_fragment() no longer has $changing_ref
in parameter list.
## SQL::Interpolate::Filter
- sql// objects now transform into calls to make_sql().