Announcement Announcement Module
Collapse
No announcement yet.
API change to springpython.core on the trunk Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • API change to springpython.core on the trunk

    There has been an API change in springpython.core that will impact those currently using the trunk source code (and keeping up), and later on when we release 0.8.0.

    I spotted the utility class RowCallbackHandler, and realized what I was really using was RowMapper. If you know Spring Java, then perhaps you are familiar with these. RowCallbackHandler's behavior is to have access to the target list, and append its converted row. RowMapper just returns a row, and another class is responsible for appending to a list of objects. This is what makes RowCallbackHandler state-based, and RowMapper stateless. RowCallbackHandler is not re-usable because you may mess up the lists, while RowMapper is stateless and very reusable.

    I prefer the stateless solution. Anyway, I replaced the RowCallbackHandler class with RowMapper, and changes its API from process_row to map_row. I kept the same arguments, because, frankly, in my experience with Spring Java, never found a use for the rowNum value, so I have seen no reason to carry that over to Spring Python.

    We are trying to clean up this code and make it as rock solid as possible before we reach 1.0, and this is just another change that, while cosmetic in implementation, does have API impacts to our user community, and we want to keep everyone informed.

    NOTE: All related test cases were updated, as well as documentation, so when this is finally released, the web site's reference manuals will also reflect this change.
Working...
X