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

(BEDS-1173) using correct table for api keys #1293

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

remoterami
Copy link
Contributor

No description provided.

apiKey, err := utils.GenerateRandomAPIKey()
var userId uint64
err := d.userWriter.GetContext(ctx, &userId, `
INSERT INTO users (password, email, register_ts)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to wrap SQL query in goqu same as we did for test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For simpler queries like this it's usually not required as it's not really worth it, with the additional error handling etc. readability isn't really increased. I'd consider it optional in such cases but if you insist, I can change it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as soon as we added test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the benefit of goqu is to validate the query before executing it. Wrapping or not is up to you.

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.

2 participants