1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533
|
Revision history for Perl extension DBIx::SearchBuilder.
1.54 Wed Jul 9 09:34:25 EDT 2008
When aborting transactions, we need to flush our cache,
because SQLite is reusing the primary id for later inserts and the cache
can otherwise become inconsistent.
1.53 Tue Apr 2 03:06:56 UTC 2008
* Fix mysql version check in DistinctQuery function
* Fix order by outer column on Oracle
* Improve tests
1.52 Tue Apr 1 00:48:56 UTC 2008
* Fix order by outer column on SQLite, mysql, adjust Pg. Add test that
cover this.
1.51 Tue Jan 15 22:53:56 UTC 2008
* Fix CountAll method when paging is enabled and data is in memory already
1.50 Fri Nov 23 23:24:00 UTC 2007
* Oracle: Don't DISTINCT query when there is a group by clause
* Fix a problem when we have more then two collections in a union
and some of them are empty
1.49 Sat Jul 7 18:45:41 EDT 2007
* Fix a CPAN signature issue
1.48 Sun Mar 11 05:24:40 UTC 2007
* Fix a problem when left joins optimizer fails to calculate a boolean
expression because of lower case aggregators.
1.47 Sun Mar 4 03:30:00 UTC 2007
* Do the search in unions only when we must do them, not on every
call to the Next method
* Don't index ex/ dir to avoid complains by the indexer of PAUSE/CPAN
1.46 Sun Feb 25 19:04:00 UTC 2007
* when doing a union, we need to actually search, rather than just
doing a count
* add support for testing with Oracle backend
* Use CROSS JOIN instead of ',' as SQL parsers in Pg and some mysql
are buggy and cannot parse "FROM X, Y JOIN Z ON Z.f = X.f"
* deprecate DEBUG method, it's still there but produce warning
* fix CleanSlate method that was missing several keys
* fix a long standing bug we had, we didn't write depends_on data about
a join, so we could build queries with incorrect parens around join
conditions
* fix default values for ALIAS1 argument in the Join method, istead of
defaulting FIELD1 to 'main' value
* fix a TODO test
* internal refactoring of a storage for query's conditions,
instead of building query strings right after the limit
or join, we now build a perl structure
* don't clone attributes that don't exists in the Clone method
* we use Encode module without perl version check for a long time, so
we can get rid of all checks for the version and load the module
at compile time everywhere we need it
* implement MayBeNull method in the handler that checks if applied
conditions allow NULLs in the result set
* implement cascaded LEFT JOINs optimization
* additional tests for CleanSlate and Clone methods, ENTRY_AGGREGATOR
argument, different types of joins and LEFT JOIN optimizer
1.45 Tue Sep 26 11:08:20 EDT 2006
* Postgres fixes:
** fix "$rec->Create();"
** fix "$rec->Create( IntegerColumn => '' );"
** fix "$rec->SetIntegerColumn( '' );"
** add test
* Cache changes
** cleanup ::Record::Cachable
** use cache in:
$a->LoadByCols(...);
$b->LoadById( $a->id );
** add cache tests
1.44
* DBIx::SearchBuilder::Handle::DatabaseVersion enhancements
1.43 Wed Apr 12 13:59:58 EDT 2006
* Fix to the sequence compatibility fixes. For backwards compatibility.
1.42 Mon Apr 10 11:27:39 EDT 2006
* Signatures fixed
1.41 Mon Apr 10 11:26:19 EDT 2006
* PG 8.1 sequence compatibility fixes from Daniel Tabuenca
1.40 not released yet
* 'NOT STARTSWITH' and 'NOT ENDSWITH'
1.39 Thu Feb 16 16:27:42 PST 2006
* Allow ORs on left joins
1.38 Thu Dec 29 03:17:54 EST 2005
* Released 1.37 dev series
1.37_01 Thu Dec 8 15:56:50 EST 2005
* Switched Postgres sequence lookups to use CURRVAL, rather than OIDs
1.36 Fri Dec 2 18:04:21 EST 2005
* Change to how we resolve virtual columns to deal with a
"no such attribute" bug in RT
1.35 Wed Nov 2 22:36:02 EST 2005
* Doc fixes and OrderBy cleanup from ruslan
1.34 Wed Nov 2 22:26:15 EST 2005
* Clone support from Ruslan
1.33 Thu Sep 22 14:27:46 EDT 2005
* Better SQL statement logging from alex
1.32 Thu Sep 1 06:52:42 EDT 2005
* DBD::SQLite is necessary for the test suite to run correctl
1.31 Fri Jul 29 12:47:25 EDT 2005
* Updated MANIFEST to fix a build issue -
Thanks to Andy Lester and David Glasser
1.30 Thu Jul 28 10:17:27 EDT 2005
* Removed {{{ and }}} fold markers. Patch from Ruslan
1.30_03 Thu Jun 9 01:35:49 EDT 2005
* Significant new tests from Ruslan Zakirov and Dave Glasser
* You no longer need to explicitly bless a DBIx::SearchBuilder::Handle subclass
* Start of a major overhaul of the subclass API for DBIx::SearchBuilder::Record objects.
A new "schema" method will define the data in _ClassAccessible and also generate database
schema using DBIx::DBSchema.
Fixes from Ruslan:
* for numeric types, make the empty check be "null or 0", not "null or ''"
* New search tests from ruslan
* added an init_data method to t/utils.pl
* CleanSlate doesnt init show_rows
* CleanSlate doesnt clean _{open|close}_parens
* get rid of stupid ifs in CleanSlate
* get rid of evals in _DoSearch and _DoCount, use Handle methods to control DBI error handling
* rewrite LoadByPrimaryKeys args handling to consistent with other Load* methods
* report error when PK filed is missing in LoadByPrimaryKeys
* fix warning in __Set methods when newvalue is undef
* small code cleanups
* test coverage grows from 75.2% to 84.7% for Record.pm
1.30_02 Sun May 22 15:21:19 EDT 2005
- Lots of patches from Ruslan:
First and main change is using of `goto &$AUTOLOAD` syntax, that helps
avoid code duplication and hides AUTOLOAD sub from stack trace. I think
this also would help implement CompileAllAutoSubs method easier.
- It's also one of the steps to better tests coverage.
- Test coverage for Record.pm grows from 66% to 75.2%.
- _LoadFromSQL never reported error when PK fields are missed. Fixed.
- fetchrow_hashref dies only when RaiseErrors is true, because we can
control this from Handle obj so we should die according to
$Handle->RaiseErrors property. Fixed.
- When RaiseErrors is "false" then fetchrow_hashref returns undef and we
should check $sth->err(see `perldoc DBI`). Fixed.
- After call to fetchrow we should clean "fetched" internal hash and fill
it only when we return successful result. Fixed.
- If SimpleQuery fails, _LoadFromSQL method doesn't return any error
message. Fixed.
1.30_01 Mon May 16 21:37:03 BST 2005
- Patches from Ruslan to switch to using 'capitalization.pm' for our regular_case subroutine aliases
1.27 Sun May 8 22:49:30 EDT 2005
- Added supoprt for functions containing "?" to represent the parameter
in ->Column()
- Added better support for functional columns in search listings and
group by clauses
1.26 Sun Apr 17 19:22:23 EDT 2005
- Added support for expression based left joins
1.25 Sat Apr 9 12:33:30 EDT 2005
- Backed out a change introduced in 1.23 that caused table and column names
to be quoted, causing Postgres to flip out.
1.24 Wed Apr 6 22:54:37 EDT 2005
- Added a new "SearchBuilder::Unique" module for uniquifying search results
1.23
- Now use DBI->quote_identifier to quote column and table names (Ruslan)
- Test suite updates (Ruslan)
1.22 Mon Jan 24 07:42:46 EST 2005
- Require encode since we require encode.
1.21
- Oracle LOB handling caused us to corrupt item values on update.
- Just before inserting things into the database, turn off their utf8 flag.
The flag didn't have any positve impact _and_ it can take down
recent DBD::Oracle releases. (This is a new failure in DBD::Oracle 1.16)
1.20 Tue Jan 18 08:24:15 EST 2005
- Minor test suite fixes from Ruslan.
1.19 Sat Jan 8 18:22:59 EST 2005
- Performing a search multiple times could result in multiple copies of
records in a collection. Uncovered thanks to Kevin Chen and Alex Vandiver.
1.18
- Release the changes from 1.17
1.17_03
- Properly mark BLOB columns in UPDATE calls. (DBD::Oracle 1.16 broke without this)
1.17_02
- Better handling of empty values for SB::Record::_Accessible. ( --Ruslan)
1.17_01
- More record tests from Ruz
1.16 Thu Dec 9 23:49:39 EST 2004
- Fixed a bug in D::SB::R::Cachable that could cause it to load the wrong row from the cache if you were loading
by alternate keys and had since changed one of the attributes of a previous row. This was unmasked by a
bug that Ruslan Zakirov found in RT 3.3's custom field handling
1.15 Sat Nov 27 13:09:56 EST 2004
- Fix a testsuite bug when DBD::SQLite isn't there
1.14
- Silenced warnings about uninitialized warnings when inserting null cols
into the database.
- Started adding lowercase method name aliases
- Minor refactoring of 'id' method for a stupid, tiny perf improvement
- Refactoring of DBIx::SearchBuilder::Record::Cachable for performance
improvement
- Added a FlushCache method to DBIx::SearchBuilder::Record::Cachable.
- Started to flesh out a...test suite
- SearchBuilder now truncates strings before inserting them into character
types in the database as mysql generally does. Additionally, it truncates
things at utf8 character boundaries...as mysql does not.
- Fix for an undefined record cache warning on load from Autrijus Tang
- Major documentation cleanups --Simon Cavalletto
- A few tweaks to the ::Record class to eliminate the
hard-coding of the name of the id column --Simon Cavalletto
1.12
- Better error handling for some query build failure cases
- Corrected query builder for SQLite
- More refactoring.
1.11
- When loading an object whose "id" has been altered, as in the case of RT's
"Merge" functionality, the wrong object was returned by the caching layer.
Special casing for the "id" method was removed.
1.10
- Identical to 1.10_05
1.10_05
- Reworked the _Accessible mechanism in DBIx::SearchBuilder::Record to
remove a horribly crufty old caching mechanism that created a copy
of the accessible hash for each and every object instantiated,
sometimes quite slowly.
1.10_04 Mon Aug 30 17:33:18 EDT 2004
A query builder fix for an issue that bit RT2:
Unsatisfied dependency chain in Joins Users_2 at /usr/local/share/perl/5.8.3/DBIx/SearchBuilder/Handle.pm line 965, line 69.
Stack:
[/usr/local/share/perl/5.8.3/DBIx/SearchBuilder/Handle.pm:965]
[/usr/local/share/perl/5.8.3/DBIx/SearchBuilder.pm:326]
[/usr/local/share/perl/5.8.3/DBIx/SearchBuilder.pm:119]
[/usr/local/share/perl/5.8.3/DBIx/SearchBuilder.pm:410]
1.10_03 Mon Aug 30 14:31:10 EDT 2004
- Cache Sanity fixes from Autrijus Tang <autrijus@autrijus.org>
1.10_02 Thu Aug 26 13:31:13 EDT 2004
1.10_01 Thu Aug 26 00:08:31 EDT 2004
- Reimplemented DBIx::SearchBuilder:::Record::Cachable
to use Cache::Simple::TimedExpiry. This should make it faster and more
memory efficient.
1.02_03 Thu Jul 22 13:29:17 EDT 2004
- Additional bullet proofing for joins.
Now we default to ALIAS1 being "main" (cubic@acronis.ru)
1.02_02 Tue Jul 20 13:06:06 EDT 2004
- Fixed a join bug that mostly manifests as a 'Dependency chain'
error on RT2.
1.02_01 Wed Jul 7 12:28:08 EDT 2004
- magic _Object instantiation from cubic@acronis.ru
- make SB::_Handle settable directly (cubic@acronis.ru)
- document the above
1.01 Sun Jun 27 23:35:46 EDT 2004
- Releasing 1.00_06 as stable
1.00_06 - Pg/Oracle: Don't attempt to do case insensitive comparisons on
integer values.
1.00_05 - Force utf8 flag on when doing searches for utf8 data; this
is a workaround for DBDs that don't do it themselves.
1.00_04 - Move Postgres specific join behaviour to the superclass so
everyone gets the benefit.
1.00_03 - Remove "AS" from table name aliases on joins, since Oracle
doesn't like em.
1.00_02 - Slightly cleaner code in SearchBuilder->GotoPage
1.00_01 - Better handling of case insensitive comparisons on Postgres
- Proper support for query paging on SQLite
0.99 - Bundled changes from 0.98* and released production version
Removed duplicate code in cache expiry routines
Experimental SearchBuilder::Union collection object.
Released at the YAPC::Taipei::22004 Release Party
0.98_04 - New mysql/oracle "Join" code that allows more complex bundling of
joins from Linda and Robert
0.98_03 - New test infrastructure from Andy Lester
0.98_02 - Better handling of != clauses on Postgres
0.97_02 - Support for "Group By" clauses.
Support for delayed load of certain columns from Autrijus Tang.
0.97_01 - Oracle doesn't support binary-safe clobs in a reasonable manner.
0.96 - Releasing 0.96_01 as usable
0.96_01 - Fix a couple of spurious warnings in Record::Cachable
Records loaded from multiple-record searches were never cached
correctly
0.95_03 - Allow case-insensitive loading by columns in SearchBuilder::Record
- Record::LoadByCols now lets you specify operator and values
0.95_01
- Removed historical escaping for non-ascii searche queries
0.94- - Fix for multiple handles in one app from Autrijus Tang
0.93
- Added ODBC database driver from Autrijus Tang
- Added the ability to sort on functions of columns from Autrijus Tang
- Improved case-insensitve searching behavior for PostgreSQL
- Added support for multiple handles in one app from Autrijus Tang (#4167)
- Added initial Informix database driver from Oliver Tappe
0.92 Sept 4, 2003
- Fixed a bug that caused certain types of pre-canned table aliases to fail to work on join
0.90 Aug 8, 2003
- Disable Class::ReturnValue's stack trace feature as it interacted poorly with a stack containing lots of data
0.89_02 July 19, 2003
- Patch from Grant DeGraw to allow ordering by multiple columns.
0.89_01 July 18 2003
- Patch from Brook for:
- better oracle support
- remove "SELECT DISTINCT" when it's not necessary
0.88 June 23 2003
- More correct generation of "Distinct" keyword on counts for queries with left joins
0.87 June 16 2003
- Changed DBIx::SB::Record::Cachable to expire cached object when a "deeper" method call changes their values
0.86 June 7 2003
- Doing conditional connections was failing on postgres, because the handle was defined, but not connected
0.85 June 7 2003
- Stan's destroy fix was actually badly breaking RT
- It's now an optional parameter.
0.84 June 4 2003
- Bumped the version for release
0.83_05 June 2 2003
- Provide support for blowing away nested transactions that aren't yet committed.
0.83_04 June 2 2003
- Fixed how values of returned hashes are downcased.
- Should be a minor perf improvement
0.83_03 May 30 2003
- Moved Stan's destryo fix to the right file
0.83_02 May 27 2003
- Better oracle support for unique ids on indexes from Brook
0.83_01 May 27 2003
- Stan's DESTROY fix
- Mathieu Arnold's patch to make function naming for
autoloaded functions a bit more flexible
0.82 May 19 2003
- Query builder changes to improve some join performance
- Fixes to a tight loop for cache expiry
0.81_04 April 14 2003
- Fixed a bug in "Distinct" logic introduced in 0.81_01
0.81_03 April 13 2003
- Patches for Oracle BLOB support from Brook Schofield
0.81_02 April 13 2003
- Rebuilt Postgres query generator.
0.81_01 Mar 27 2003
- Select Distinct altered to support oracle
0.80 Mar 08 2003
- Count method enhanced to ignore "LIMIT"s
- LIMIT behaviour changed to be handle specific
0.79 Jan 19 2003
- ReadableAttributes and WritableAttributes added as methods to Record.pm
0.78 Jan 16 2003
- SB->Count should return no results unless the search is limited
- Eliminate a warning on empty searches
0.77 Jan 15 2003
- No longer attempt to cache (and fail) objects that haven't been database-loaded
0.76 Dec 30 2002
- Extra checking for cache misses in DBIx::SearchBuilder::Record::Cachable
- The start of support for checking database version, so that we can do
version-specific SQL
- A patch from Autrijus Tang that allows utf-8 safe searching
0.75 Dec 06 2002
- Applying a patch from Rob Spier <rspier@pobox.com> which enables
arbitrarily complex grouping clauses. It's a hack, but we love it
anyway....at least until SB gets redone with proper arbitrarily
complex query generation.
0.74 Oct 11 2002
- Adding support for mysqlPP
0.73 Sep 10 2002
- More class-returnvalue ification
- Fixed a caching bug that caused multiple copies of an object in memory to not
be kept in sync
0.72 Aug 28 2002
- Fixed bug in setting a column to the value of an SQL statement.
0.70 Aug 27 2002
- Better support for Postgres 7.2 and transactions.
0.62 Jul 5 2002
- Support for Class::ReturnValue to channel errors up when expected
- Dependency on Class::ReturnValue
- Minor cleanups and refactorings to allow percolation of errors on create
0.34 May 23 2001
- SearchBuilder.pm - refactored to allow LEFT joins.
0.31 Say May 12 14:45:00 EDT 2001
- SearchBuilder::Record::Cachable now constructs cache keys in a way
that doesn't lose when records in different tables have the same keys.
0.30 Fri May 11 14:59:17 EDT 2001
- Added DBIx::SearchBuilder::Record::Cachable from <mhat@netlag.com>
- Changed SearchBuilder->Count to do the right thing if no
query has been performed
- No longer specify a sort order if no sort order was specified ;)
0.01 Tue Aug 29 16:08:54 2000
- original version; created by h2xs 1.19
|