File: ROADMAP

package info (click to toggle)
libdbix-searchbuilder-perl 1.66-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 664 kB
  • ctags: 446
  • sloc: perl: 9,458; makefile: 2
file content (59 lines) | stat: -rw-r--r-- 2,711 bytes parent folder | download | duplicates (11)
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
Things should/could be done in 1.x releases:
    * cover as much as possible code with tests
    * IsLast is not consistent(see t/01records.t)
    * LoadFromHash doesn't return any errors as other Load* methods do
        ** it should report back missing PK fields
    * Don't prevent DBI from die or reporting errors, now we have control
      with RaiseErrors and PrintErrors in Handle.pm. We should just check
      for $sth is defined and check $sth->err if fetch* methods returns undef.
        ** partly fixed
    * Count&CountAll:
        ** Count should always return how much rows we can fetch with Next,
           using pages affect this.
        ** CountAll should always return how many records we can fetch with
           applied conditions no matter use we pages or not to fetch it.
        ** document differences of the methods
    * More support for compound PKs.

Known bugs:
    * CountAll corner case:
        * new collection
        * CounAll returns 0
        * Limit collection
        * CountAll returns correct value
        * UnLimit or apply other limit(only change must_redo_search)
        * CountAll returns old value

        Could be fixed in one line change in CountAll sub, but interfere with
        Pages. When you call NextPage or other page walking methods
        must_redo_search bcomes true also so CountAll after NextPage force
        useless query.

Things should be done in 2 release:
    * switch to lover case API
        ** patch capitalization.pm to support converting from lower case
           to upper.
    * Class::ReturnValue is prefered way to handle errors, should implement
      it in all error paths.
    * rework&review pages support, now I can't write next code:
      while( $records->NextPage ) {
        while( my $rec = $records->Next ) {
          ...
        }
      }

    * New methods: Prev, Current. Refactor collection walking:
        ** $sb->{itemscount} can be undef, what means that we are in the begin
           or end of the set.
        ** Current, returns undef if $sb->{itemscount} is undef, in other case
           returns record from array using $sb->{itemscount} as index.
        ** IsLast and IsFirst return undef if Current is not defined, and
           return 0 or 1 in other cases.
        ** First and Last - work as before, return undef or object.
        ** GotoItem supports undef as argument and returns undef or object.
        ** Next walks forward, returns first object if Current is undef,
           if there is no Next in set drops $sb->{itemscount} to undef and
           returns undef.
        ** Prev walks backward and works like Next, but if Current is undef
           it starts from Last record.