~ubuntu-branches/debian/squeeze/movabletype-opensource/squeeze

« back to all changes in this revision

Viewing changes to extlib/Data/ObjectDriver.pm

  • Committer: Bazaar Package Importer
  • Author(s): Dominic Hargreaves
  • Date: 2008-06-13 23:28:40 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080613232840-ya4jfxv1jgl45a3d
Tags: 4.2~rc2-1
* New upstream release candidate
* Update Standards-Version (no changes)
* Ensure that schema upgrade message is always seen

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: ObjectDriver.pm 421 2007-11-30 00:57:10Z bchoate $
 
1
# $Id: ObjectDriver.pm 494 2008-06-10 23:13:56Z bchoate $
2
2
 
3
3
package Data::ObjectDriver;
4
4
use strict;
10
10
 
11
11
__PACKAGE__->mk_accessors(qw( pk_generator ));
12
12
 
13
 
our $VERSION = '0.04';
 
13
our $VERSION = '0.05';
14
14
our $DEBUG = $ENV{DOD_DEBUG} || 0;
15
15
our $PROFILE = $ENV{DOD_PROFILE} || 0;
16
16
our $PROFILER;
56
56
 
57
57
sub end_query { }
58
58
 
 
59
# Not all drivers support transactional operations, but some will override
 
60
# these methods with their own implementations
 
61
sub begin_work {
 
62
    print STDERR "->begin_work not implemented on $_[0], continuing non-transactionally\n";
 
63
}
 
64
 
 
65
sub commit {
 
66
    print STDERR "->commit not implemented on $_[0], continuing non-transactionally\n";
 
67
}
 
68
 
 
69
sub rollback { 
 
70
    print STDERR "->rollback not implemented on $_[0], continuing non-transactionally\n";
 
71
}
 
72
 
59
73
sub debug {
60
74
    my $driver = shift;
61
75
    return unless $DEBUG;
106
120
}
107
121
 
108
122
sub cache_object { }
 
123
sub uncache_object { }
109
124
 
110
125
1;
111
126
__END__
396
411
If set to a true value, the I<SELECT> statement generated will include a
397
412
I<FOR UPDATE> clause.
398
413
 
 
414
=item * comment
 
415
 
 
416
A sql comment to watermark the SQL query.
 
417
 
 
418
=item * window_size
 
419
 
 
420
Used when requesting an iterator for the search method and selecting
 
421
a large result set or a result set of unknown size. In such a case,
 
422
no LIMIT clause is assigned, which can load all available objects into
 
423
memory. Specifying C<window_size> will load objects in manageable chunks.
 
424
This will also cause any caching driver to be bypassed for issuing
 
425
the search itself. Objects are still placed into the cache upon load.
 
426
 
 
427
This attribute is ignored when the search method is invoked in an array
 
428
context, or if a C<limit> attribute is also specified that is smaller than
 
429
the C<window_size>.
 
430
 
399
431
=back
400
432
 
401
433
=head2 Class->search(\@terms [, \%options ])