Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7323

Please rename DbStorage.next to something less confusing

    XMLWordPrintable

Details

    • Improvement
    • Status: Invalid
    • Resolution: Done
    • None
    • daf_persistence
    • None
    • Data Access and Database

    Description

      lsst.daf.persistence.DbStorage has a method named next that does not act like a python iterator. This makes the Python interface confusing. Please rename the method to something else (preferably both in C++ and Python).

      Thanks to tjenness for discovering this.

      Attachments

        Issue Links

          Activity

            tjenness Tim Jenness added a comment -

            Yes, DM-7226 has to be reverted because the C++ next method is not at all related to the Python2 next special method. It would be great if we removed the confusion completely by renaming the C++ method to nextRow or nextResult or something.

            tjenness Tim Jenness added a comment - Yes, DM-7226 has to be reverted because the C++ next method is not at all related to the Python2 next special method. It would be great if we removed the confusion completely by renaming the C++ method to nextRow or nextResult or something.
            rowen Russell Owen added a comment - - edited

            I feel that any name like nextX implies that the method returns the next "x". Since this method simply advances a pointer without returning any information (other than a bool indicating that there is a next result), I hope you can figure out a name that makes this more obvious. I suggest gotoNextResult or even just gotoNext.

            rowen Russell Owen added a comment - - edited I feel that any name like nextX implies that the method returns the next "x". Since this method simply advances a pointer without returning any information (other than a bool indicating that there is a next result), I hope you can figure out a name that makes this more obvious. I suggest gotoNextResult or even just gotoNext .
            ktl Kian-Tat Lim added a comment -

            We should be moving to deprecate DbStorage and replace it with SQLAlchemy (and/or Butler access to database datasets). But I'm not sure if right now is the time.

            ktl Kian-Tat Lim added a comment - We should be moving to deprecate DbStorage and replace it with SQLAlchemy (and/or Butler access to database datasets). But I'm not sure if right now is the time.
            tjenness Tim Jenness added a comment -

            This code was removed in DM-13788.

            tjenness Tim Jenness added a comment - This code was removed in DM-13788 .

            People

              npease Nate Pease [X] (Inactive)
              rowen Russell Owen
              Kian-Tat Lim, Nate Pease [X] (Inactive), Russell Owen, Steve Pietrowicz, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.