-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add source filter for queries. #11
Add source filter for queries. #11
Conversation
internal/repositories/signal.go
Outdated
func (r *Repository) GetLatestSignalString(ctx context.Context, sigArgs SignalArgs) (*model.SignalString, error) { | ||
query := fmt.Sprintf(latestSignalQuery, "ValueString") | ||
row := r.conn.QueryRow(ctx, query, sigArgs.TokenID, sigArgs.Name) | ||
func (r *Repository) getLatestSignal(ctx context.Context, sigArgs *SignalArgs, valueCol string, dest ...any) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the shape/typing of dest
vary at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, one will call dest with a float, the other with a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed the context stuff! I didn't mean to bother about that in this PR but it looks nice to me.
Rest is great.
No description provided.