Mangatsu / server

🌕 Media server for storing, tagging and viewing doujinshi, manga, art collections and other galleries with API and user control. Written in Go.
GNU General Public License v3.0
43 stars 6 forks source link

Migrate `db.go`, `library.go` to goqu #20

Closed karmek-k closed 2 years ago

karmek-k commented 2 years ago

Fixes #14

As said in the beginning of library.go:

// FIXME: it won't work yet!! CombinedLibrary has to be a plain struct,
// something like this:
//
//  type User struct {
//      FirstName string `db:"first_name"`
//      LastName  string `db:"last_name"`
//  }

We need to create "model" structs with column names in db tags.

And also for now, newLibrary doesn't handle the case when an ID exists. I haven't tested the code because we don't have those annotated model structs, as said earlier.

CrescentKohana commented 2 years ago

We need to create "model" structs with column names in db tags.

If you want to start on that, you can assign yourself to this issue: #15 (promoted you to Triage for this repository so that it's easier for you to work on issues & PRs).

Otherwise LGTM.