aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sql
diff options
context:
space:
mode:
authorTeddy Wing2017-05-30 15:48:09 +0200
committerTeddy Wing2017-05-31 17:57:36 +0200
commitd22ee707c026a71dac64da792cb22f46a1a1dbde (patch)
tree71c50447ed424f156f7c74d386ab07ddad141e3b /lib/sql
parent6f7ad36f3b958a719a8f39c75749a641ace189c5 (diff)
downloadchouette-core-d22ee707c026a71dac64da792cb22f46a1a1dbde.tar.bz2
VehicleJourneyAtStopsDayOffset: Restructure methods for persistence
The `#calculate!` method didn't actually save anything to the database. Deciding to keep the `!` because it does modify the object's internal at-stops. I didn't call an update on the at-stop objects in `#calculate!` on purpose as I wanted to avoid hitting the database in the tests to try to keep them from getting too much slower than they already are. But, we need to be able to persist the day_offset values when this class gets integrated. To do so, adding an `#update` method that will run the calculation function and update the objects in the database. Split out the actual updating into a new `#save` method because that seems logically separate. Decided not to test these two methods as the real work we care about is in `#calculate!`. Refs #3596
Diffstat (limited to 'lib/sql')
0 files changed, 0 insertions, 0 deletions