Debian Codegraph @

Changes

raw
1 Revision history for Perl extension DBD::Mock.
2
3 1.60 2026-08-26T07:32:31Z
4 - Requires at least Perl v5.12 (bringing it inline with DBI)
5 - Added support for using arrayref's as bound parameters with PostgreSQL
6 databases. Thanks to Erik Huelsmann for the both the suggestion and the
7 merge request that provided the feature.
8
9 1.59 2021-02-22T13:25:52Z
10 - Added error detection for when a result set's callback doesn't return
11 an arrayref or arrayrefs
12 - Moved to GitLab for issue tracking
13
14 1.58 2020-11-02T13:34:48Z
15 - Added the ability for mock result sets to set custom attributes for
16 statement handles. Thanks to Erik Huelsmann for testing the new feature.
17
18 1.57 2020-09-18T06:57:48Z
19 - Fixed bug rt133358 t/016_mock_add_resultset_test.t fails (with older DBI)
20
21 1.56 2020-09-17T14:35:10Z
22 - The DBD::st module now supports the last_insert_id method
23 - Result sets with callbacks can now specify a last_insert_id
24
25 1.55 2019-12-30T14:20:00Z
26 - Fixed bug rt131264 t/033_table_info.t fails (with older DBI)
27
28 1.54 2019-12-23T12:44:22Z
29 - Added Bernhard Graf's 'Feature: one shot failure' merge request.
30 - Fixed description of the failure attribute of mock_add_resultset. It
31 no longer claims to support a hash ref (as it doesn't). Thanks to
32 Bernhard Graf for both the bug report and a merge request that fixes it.
33 - Fixed bug where it wasn't possible to replace a regular expression
34 mock resultset. Thanks to Bernhard Graf for both the bug report and
35 a merge request that fixes it.
36 - Fixed bug where the failure attribute wasn't working with regular
37 expression mock resultsets. Thanks to Bernhard Graf for both the bug
38 report and a merge request that fixes it.
39
40 1.53 2019-12-03T10:50:57Z
41 - Error handling in mock_add_resultset is no longer experimental
42 - Attribute Aliasing is no longer experimental
43
44 1.52 2019-10-28T11:35:41Z
45 - Added in callback feature for result sets so that their contents
46 can be more dynamic.
47
48 1.51 2019-10-23T11:43:51Z
49 - Fixed issue with using attribute aliases alongside a driver DSN
50 in the DBI->connect call
51
52 1.50 2019-10-22T19:37:26Z
53 - Added attribute aliases support for MariaDB
54
55 1.49 2019-09-12T12:59:51Z
56 - Fixing tests that fail on some old versions of Perl
57
58 1.48 2019-09-12T06:34:47Z
59 - Added execution_history feature to enable tracking of multiple
60 executes for prepared statements.
61 - Added support for $dbh->table_info calls
62 - Fixed bug rt91055 "insert IGNORE" doesn't raise last_insert_id
63 - Fixed bug rt82243 Bug with Regex in DBD::Mock::Session
64
65 1.47 2019-09-06T10:03:39Z
66 - Applied Max Carey's patch from rt86294 adding support for
67 nested keys to fetchall_hashref
68 - Added experimental Connection Callbacks feature
69 - Fixed build for Perl v5.8
70
71 1.46 2019-09-04T12:02:08Z
72 - Added git-repo url to meta-data
73 - Fixed bug rt70587 Spelling Mistake
74 - Added regex support to mock_add_resultset
75
76 1.45 October 22, 2012
77 - Extended DBD::Mock::Session functionality
78 - Added bind_param_array() to mocked statements
79 - Added execute_array() to mocked statements
80
81 1.43 August 29, 2011
82 - Segregated into different packages
83 - Removed code coverage from POD
84 - Fixed bug rt49537 Basic support for named parameters
85 - Fixed bug rt70421 Build.PL now contains Test::Exception
86
87 1.42 August 7, 2011
88 - Fixed bug rt66815 DBD::Mock::Session error clobbered
89 - Fixed bug rt69460 Info on META.yml is outdated
90 - Fixed bug rt69055 Spelling mistakes in POD
91 - RaiseError now works
92
93 1.41 June 22, 2011
94 - Changed incorrect verion number
95
96 1.40 June 19, 2011
97 - Fixed bug rt44591 second preapre giving an error
98 - Fixed bug rt57981 warnings during clone
99 - Fixed bug rt63191 Synopsis errors
100 - Fixed bug rt66813 Google's group link in the POD
101
102 1.39 November 9, 2008
103 - If a statement handle had bound columns, then the fetch() and
104 fetchrow_arrayref() methods never returned false. After they
105 exhausted their data, they kept returning empty array
106 references.
107 - Hid all packaged but DBD::Mock from PAUSE.
108
109 1.38 November 8, 2008
110 - Bumped minimum Perl to 5.8.1, since that's what DBI requires.
111 - Fixed incorrect use of no_plan in t/025_mock_last_insert_id.t.
112 - The handling of attributes passed to the constructor was not
113 correct. The major symptom was that attributes (such as
114 RaiseError) which were passed to the constructor could not be
115 overridden in the database handle which was returned from
116 connect(). As a result, some attributes set to a false value may
117 return '' instead of 0.
118
119 1.37 June 12, 2008
120 - New co-maintainer (aka sucker), Dave Rolsky
121 - Added support for $sth->bind_col() and $sth->bind_cols()
122 - Fixed and clarified docs for the mock_last_insert_id and
123 mock_start_insert_id attributes. The previous docs were both
124 wrong and confusing
125 - Applied patch from RT #35145 to add support for the Column
126 attribute with selectcol_arrayref
127 - patch by Matt Lawrence
128
129 1.36 October 18, 2007
130 - $dbh->last_insert_id() now works as documented
131 - Added a "use 5.006;" in order to put a safeguard on the "use warnings;"
132 statement a little further down.
133
134 1.35 July 9, 2007
135 - Applying path from RT #16951 to return
136 new result set for repeated calls to
137 $sth->execute(). Thanks to Marc Beyer for this.
138 - added tests for this
139 - Fixing RT #25892 to make mock_records method
140 work correctly.
141 - added test for this
142 - applying patch from RT #26604 to fix AutoCommit
143 behavior. Thanks to Ryan Gerry for this.
144
145 1.34 July, 29 2006
146 - Fixed how AutoCommit is handled to avoid $dbh caching (RobK)
147 - Thanks to Chas Owens for patch and test
148 for the mock_can_prepare, mock_can_execute,
149 and mock_can_fetch features.
150
151 1.32 Wed Dec 14, 2005
152 - Fixed RT Bug #15599
153 - Fixed RT Bug #15602
154
155 - converted to Module::Build
156 - removed the VERSION file, and adjusted the numbers
157 in all places needed
158
159 - added patch from Andrew W. Gibbs to allow the ARRAY
160 version of 'mock_last_insert_id' attribute
161 - added test file as well
162 - added docs on it too
163
164 - $sth->execute now returns the number of rows as per the
165 DBI docs
166 - added some tests for this
167
168 >> DBD::Mock::Session
169 - now allows regexp's in the bound_params list
170 so that you can check your params are 'like'
171 something, and not exactly something
172 - Improved error messages
173
174 0.28 Wen July 13, 2005
175 - update to patch from Andrew McHarg <[email protected]>
176 to fix behavior in selectcol_arrayref() methods and tests
177 - fix version in META.yml
178 - some refactoring of fetchall_hashref(), fetchrow_hashref()
179 to incorporate DBD-Mock error handling.
180
181 0.27 Mon July 11, 2005
182 - added NULL_RESULTSET constant
183 - now allowing errors to be set with mock_add_resultset.
184 Support is currently experimental, see the file
185 't/023_statement_failure.t' and the EXPERIMENTAL section
186 of the docs for more information.
187 - added patch from Collin Winter to fix a bug in
188 the begin_work(), commit() and rollback() methods
189 - added patch from Andrew McHarg <[email protected]> for
190 the fetchall_hashref(), fetchrow_hashref() and
191 selectcol_arrayref() methods and tests
192
193 0.26 Fri Apr 08 2005
194 - added Rob Kinyon to the AUTHORS list
195 - added get_info() and set_info()
196 - added tests for this
197 - added bind_param_inout() for DBD::Mock::st
198 code from Thilo Planz (Thanks Thilo)
199 - added tests for this
200 - added mock_data_sources and mock_add_data_sources
201 properties for the Driver and Database handles
202 - added tests and docs for this
203 - added begin_work(), commit() and rollback() method
204 implementations which wrap the prepare() method and
205 deal with the AutoCommit value per the DBI spec.
206 - added tests and docs for this
207
208 0.25 Sat Feb 26 2005
209 - removed the DBD::Mock::_error_handler routine
210 since it was actually redundant with the DBI::set_err
211 method. This was actually the source of the RT Bug #11515
212 which was found by Shlomi Fish (thanks Shlomi)
213 - adjusted some tests for this fix
214
215 0.24 Fri Jan 28 2005
216 - added the reset() method to the DBD::Mock::Session
217 object so that a session can be used more than once.
218 - added tests for this
219 - added docs for this
220 - fixed a bug where the HASH version of 'mock_add_resultset'
221 would consume the result sets and they would not be
222 reusable. We now copy the result sets so that every time
223 the statement is called the same results are returned
224 - did not need to add docs for this, they already
225 documented this as the behavior (hence calling this
226 a bug)
227 - added tests for this
228
229 0.23 Tues Jan 25 2005
230 - removed the trace log tests from t/10_db_handle.t
231 since they seemed to be a source of issues on Win32.
232 My rationale is that it is a DBI thing, and therefore
233 does not need to be tested by DBD::Mock.
234
235 - added a few more tests to t/11_dr_handle.t to test the
236 'mock_connect_fail' feature
237
238 - added some clarification in the docs about the
239 'mock_connect_fail' feature as well.
240
241 0.22 Mon Jan 24 2005
242 - added the 'mock_connect_fail' boolean attribute
243 for the DBD::Mock driver handle, this will prevent
244 DBI from connecting. It can be used to simulate a
245 bad DSN or something like that.
246 - added tests and documentation for this.
247 - Thanks to Justin DeVuyst for this idea.
248
249 0.21 Sun Jan 16 2005
250 > DBD::Mock::Session
251
252 - added the optional 'bound_params' slot for the
253 DBD::Mock::Session object
254 - added tests for this
255 - added documentation for this
256
257 - added error to handle cases where there are not
258 enough states in a DBD::Mock::Session object.
259 - added tests for this
260 - added documentation for this
261
262 - added the ability to remove a session (by setting
263 it to a false value)
264 - added tests for this
265 - added documenation for this
266
267 > DBD::Mock
268
269 - added test to check about overwriting hash-based
270 result sets with 'mock_add_resultset' attribute
271 - added documentation for this
272
273 0.20 Fri Jan 14 2005
274 - Modified a set of tests in t/10_db_handle.t to pass on Cygwin.
275 Thanks to Rob Kinyon for this code. This code now uses File::Temp
276 to make the temp log file in a cross platform manner. If File::Temp
277 is not found on the system, then the tests are skipped.
278
279 0.19 Fri Jan 7 2005
280 - changed the VERSION in lib/DBD/Mock.pm to be 1.23, allow me to explain...
281
282 Chris Winters (the original author ) used the CVS derived
283 VERSION, which when I took over the module (8 versions ago)
284 was at 1.15. Since I was not using Chris's CVS repo to store this
285 I decided to give Mock.pm the VERSION number found in the VERSION
286 file.
287
288 Well,... PAUSE's indexer doesn't like it since it is a lower
289 number and would complain every time I uploaded a new version.
290 I ignored these complaints (at my own peril) until now.
291
292 I found out recently that if you had version 0.11 or below installed
293 (where the Mock.pm was version 1.15 or below), then installing through
294 the CPAN shell would tell you DBD::Mock was up to date, even though it
295 wasn't. So in order to fix this issue, and make sure that all those who
296 want to install and update DBD::Mock easily, I changed the version
297 number of DBD::Mock to be 1.23 to reflect the number of updates
298 I have done since Chris handed it over to me.
299
300 *sigh*
301
302 Okay good, thats off my chest now.
303
304 0.18 Wed Jan 5 2005
305 - added reset() method to the
306 DBD::Mock::StatementTrack::Iterator object
307 - added test and docs for this
308
309 - added the DBD::Mock::Session object and added
310 the support for it in the DBD::Mock driver
311 - added tests and docs for this
312 - Thanks to Rob Kinyon and Chris Winters for
313 their feedback on this feature
314
315 - some general POD cleanup and formatting
316
317 0.17 Thurs Nov 4 2004
318 - added the following items:
319 - a 'mock_num_rows' attribute which will give you
320 the number of records affected/returned by the
321 last statement
322 - a num_rows method in the DBD::Mock::StatementTrack
323 object, which is where the above attribute gets it's
324 value
325 - added the 'rows' method for statement handles (which didnt
326 work before)
327
328 0.16 Sat Oct 30 2004
329 - minor change to the DBD::Mock::StatementTrack::Iterator
330 behavior. It no longer derefs the history array, so it
331 maintains a reference to it and therefore can be used like
332 this:
333 get-statement-iterator
334 run-query
335 check-next-statement-in-iterator
336 run-query
337 check-next-statement-in-iterator
338 ...
339 This prevents the need to re-fetch the iterator after
340 each query.
341
342 0.15 Fri Oct 29 2004
343 - added the DBD::Mock::StatementTrack::Iterator
344 object which can be accessed from the
345 'mock_all_history_iterator' attribute.
346 - write the docs and test for it
347
348 0.14 Fri Oct 29 2004
349 - added the mock_last_insert_id attribute
350 which will get incremented upon each INSERT
351 query run.
352 - added tests and docs for this
353 - added the mock_start_insert_id attirbute
354 so that you can both reset and set the start
355 number for mock_last_insert_id
356 - added tests and docs for this
357
358 ** EXPERIMENTAL FEATURE (use caution) **
359 - added a feature to alias attributes. Basically it
360 allows you to alias an expected attribute like
361 'mysql_insertid' to something DBD::Mock already has
362 like 'mock_last_insert_id'.
363 Right now this feature is highly experimental, and
364 has been added as a first attempt automatically handle
365 some of the DBD specific attributes which are commonly
366 used/accessed in DBI programming.
367
368 0.13 Thurs Oct 28 2004
369 - added prepare_cached as suggested by Rob Kinyon
370 in RT bug #7331. Also added his test script in
371 15_prepare_cached.t
372
373 0.12 Thurs Sept 2 2004
374 ** First version maintained by Stevan Little <[email protected]> **
375 - built up the test suite to 89.7% coverage
376 - removed the undocumented 'mock_auto_commit' since it really
377 was not very useful at this point.
378 - added the DBD::Mock::Pool functionality
379 - added tests for this
380 - added documentation for this
381 - added pod.t to test suite
382 - removed AUTOLOAD in DBD::Mock::StatementTrack and replaced it with
383 hand coded methods (sorry I really dislike AUTOLOAD)
384 - centralized error handling in DBD::Mock::_error_handler
385
386 0.11 Fri Jul 23 10:35:13 EDT 2004
387
388 - Fix CPAN Bug #7057: add a no-op 'disconnect_all()' to
389 DBD::Mock::dr to support DBI versions earlier than 1.34.
390
391 - Add the ability to create SQL parsers that get fired on a
392 prepare(). This way you can ensure your application generates
393 correct SQL and have the system fail at the right time. Thanks
394 to Rob Kinyon <[email protected]> for the idea.
395
396 0.10 Sat May 8 14:12:39 EDT 2004
397
398 - Incorporate number of patches from Stevan Little to implement
399 'mock_can_connect', which allows you to simulate a downed
400 database. Add supporting tests for database and statement usage.
401
402 - Add the ability for 'mock_add_resultset' to associate a
403 resultset with a particular SQL statement. Thanks to Stevan for
404 the idea.
405
406 - Add documentation for database handle property
407 'mock_add_resultset'
408
409 0.02 Tue Mar 9 12:56:54 EST 2004
410
411 Add 'VERSION' to MANIFEST, thanks to Mike Castle for the note.
412
413 0.01 Sun Mar 7 23:24:24 EST 2004
414
415 Initial version spawned from DBD::NullP shipped with the
416 DBI. Many thanks much to Tim Bunce for the pointer and the
417 original code.
418