falling-fruit / falling-fruit-api

API (v0.3) for Falling Fruit
https://fallingfruit.org/api/0.3
GNU General Public License v3.0
5 stars 1 forks source link

db hint #1

Closed vitaly-t closed 6 years ago

vitaly-t commented 6 years ago

you do not need to use (task || this.db) in your repositories, because you are following the Repository pattern, which already provides tasks/transactions context automatically where needed.

ezwelty commented 6 years ago

@vitaly-t , thanks for swooping in! I could have sworn that the simple way wasn't working, but it certainly does now.

vitaly-t commented 6 years ago

You are welcome!

b.t.w. tasks are not needed when executing just one query ;)

https://github.com/falling-fruit/api/blob/888d7af3c51718af311e2ed8ad1c2b7d9e1d50ca/index.js#L34

ezwelty commented 6 years ago

@vitaly-t noted and acted on!