Closed modrzew closed 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).
ctx.db
*sql.DB
*db.Handler
db/queries.go
search.go
collections.go
admin.go
application.go
@phpeter I verified that it works after my changes. Can you merge it?
I will probably end up implementing the rest as I fix the conflicts with my own branch
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 (indb/queries.go
).Todo
search.go
collections.go
move queries fromwill not be done hereadmin.go
move queries fromwill not be done hereapplication.go