pebble-dev / rebblestore-api

Rebble Store api code.
MIT License
39 stars 8 forks source link

Move some DB queries to `db` package #22

Closed modrzew closed 7 years ago

modrzew commented 7 years ago

Keeping things separate - there should be no raw SQL queries in controllers/route handlers.

This changes ctx.db in context from *sql.DB to *db.Handler, which also has all query methods (in db/queries.go).

Todo

modrzew commented 7 years ago

@phpeter I verified that it works after my changes. Can you merge it?

azertyfun commented 7 years ago

I will probably end up implementing the rest as I fix the conflicts with my own branch