Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Apr 6, 2022
Merged

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

merged 11 commits into from
Apr 6, 2022

Conversation

karmek-k
Copy link
Collaborator

@karmek-k karmek-k commented Apr 6, 2022

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 CrescentKohana self-requested a review April 6, 2022 18:27
@CrescentKohana
Copy link
Member

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.

pkg/db/library.go Show resolved Hide resolved
@CrescentKohana CrescentKohana changed the base branch from main to goqu-rework April 6, 2022 18:58
@CrescentKohana CrescentKohana merged commit 3dff4d4 into Mangatsu:goqu-rework Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate db.go and library.go to goqu
2 participants