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

Enable gorm filtering by Identifier #98

Merged
merged 2 commits into from
Aug 10, 2018
Merged

Enable gorm filtering by Identifier #98

merged 2 commits into from
Aug 10, 2018

Conversation

dkukharau
Copy link

@dkukharau dkukharau commented Aug 9, 2018

Breaking changes:

  • ApplyCollectionOperators and other public function signatures are changed.

@dkukharau dkukharau added the breaking change Introduces a backward incompatible change label Aug 9, 2018
@@ -15,7 +18,7 @@ import (
// according to obj GORM model. If fieldPath cannot be found in obj then original fieldPath is returned
// to allow tables joined by a third party.
// If association join is required to resolve the field path then it's name is returned as a second return value.
func HandleFieldPath(fieldPath []string, obj interface{}) (string, string, error) {
func HandleFieldPath(ctx context.Context, fieldPath []string, obj interface{}) (string, string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need context here?

@@ -6,7 +6,10 @@ import (
"reflect"
"strings"

"context"
Copy link
Contributor

Choose a reason for hiding this comment

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

please check fmt and organize imports properly.

@@ -10,7 +11,7 @@ import (
// - association table name
// - source join keys
// - target join keys
func JoinInfo(obj interface{}, assoc string) (string, []string, []string, error) {
func JoinInfo(ctx context.Context, obj interface{}, assoc string) (string, []string, []string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why we need context here?

Copy link
Contributor

@Evgeniy-L Evgeniy-L left a comment

Choose a reason for hiding this comment

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

please fix imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Introduces a backward incompatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants