-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(go/plugins/firebase): add firestore retriever to go firebase plugin #791
base: next
Are you sure you want to change the base?
Conversation
t.Error("retrieved document is nil") | ||
} | ||
} | ||
fmt.Printf("Doc with content \n\n %s \n\n retrieved \n\n", resp.Documents[0].Content[0].Text) |
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.
I'm confused: where does this test add documents to the collection?
Anyway, assuming you know the documents, you can do a little better here by checking their content, or at least part of their content (like a substring).
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.
I still don't see where the documents come from. If they have to be present in the DB already, add a comment explaining that.
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.
Yup! will sort this out, applying these changes when I can in between some js work
go/plugins/firebase/retriever.go
Outdated
|
||
coll := cfg.Client.Collection(cfg.Collection) | ||
if coll == nil { | ||
return nil, fmt.Errorf("collection path is invalid") |
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.
fmt.Errorf("DefineFirestoreRetriever: collection path %q is invalid", cfg.Collection)
Also I wonder if we could call this outside the closure to check the error earlier.
t.Error("retrieved document is nil") | ||
} | ||
} | ||
fmt.Printf("Doc with content \n\n %s \n\n retrieved \n\n", resp.Documents[0].Content[0].Text) |
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.
I still don't see where the documents come from. If they have to be present in the DB already, add a comment explaining that.
521a059
to
32c9d3c
Compare
32c9d3c
to
adf420a
Compare
This PR adds a firestore retriever helper to the Go plugin
(Merge #790 first)
Resolves #711
Checklist (if applicable):