Debian Codegraph @

ROADMAP

raw
1 Things should/could be done in 1.x releases:
2 * cover as much as possible code with tests
3 * IsLast is not consistent(see t/01records.t)
4 * LoadFromHash doesn't return any errors as other Load* methods do
5 ** it should report back missing PK fields
6 * Don't prevent DBI from die or reporting errors, now we have control
7 with RaiseErrors and PrintErrors in Handle.pm. We should just check
8 for $sth is defined and check $sth->err if fetch* methods returns undef.
9 ** partly fixed
10 * Count&CountAll:
11 ** Count should always return how much rows we can fetch with Next,
12 using pages affect this.
13 ** CountAll should always return how many records we can fetch with
14 applied conditions no matter use we pages or not to fetch it.
15 ** document differences of the methods
16 * More support for compound PKs.
17
18 Known bugs:
19 * CountAll corner case:
20 * new collection
21 * CounAll returns 0
22 * Limit collection
23 * CountAll returns correct value
24 * UnLimit or apply other limit(only change must_redo_search)
25 * CountAll returns old value
26
27 Could be fixed in one line change in CountAll sub, but interfere with
28 Pages. When you call NextPage or other page walking methods
29 must_redo_search bcomes true also so CountAll after NextPage force
30 useless query.
31
32 Things should be done in 2 release:
33 * switch to lover case API
34 ** patch capitalization.pm to support converting from lower case
35 to upper.
36 * Class::ReturnValue is prefered way to handle errors, should implement
37 it in all error paths.
38 * rework&review pages support, now I can't write next code:
39 while( $records->NextPage ) {
40 while( my $rec = $records->Next ) {
41 ...
42 }
43 }
44
45 * New methods: Prev, Current. Refactor collection walking:
46 ** $sb->{itemscount} can be undef, what means that we are in the begin
47 or end of the set.
48 ** Current, returns undef if $sb->{itemscount} is undef, in other case
49 returns record from array using $sb->{itemscount} as index.
50 ** IsLast and IsFirst return undef if Current is not defined, and
51 return 0 or 1 in other cases.
52 ** First and Last - work as before, return undef or object.
53 ** GotoItem supports undef as argument and returns undef or object.
54 ** Next walks forward, returns first object if Current is undef,
55 if there is no Next in set drops $sb->{itemscount} to undef and
56 returns undef.
57 ** Prev walks backward and works like Next, but if Current is undef
58 it starts from Last record.
59