-
Notifications
You must be signed in to change notification settings - Fork 84
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Implement farfetch
#242
Comments
dj.get
An alternative suggestion for the syntax. search = self.search(key) # create the search object
nslices = search['nslices'] # fetch nslices
# tables containing the attributes are joined if they are in the same search call
traces, rois = search['trace', 'roi'] # fetch matched traces and ROIs from different tables |
I like it. This will allow more portable code that relies on descriptive attribute names and survives changes in the schema design. |
Another discussion and a different syntax. nslices = (self & key).search1['nslices'] # fetch nslices as a scalar.
# tables containing the attributes are joined if they are in the same search call
traces, rois = (self & key).search['trace', 'roi'] # fetch matched traces and ROIs from different tables |
Another syntax search = self.search(key)
nslices = search.fetch1['nslices'] # fetch nslices as a scalar.
# tables containing the attributes are joined if they are in the same search call
traces, rois = search.fetch['trace', 'roi'] |
Another syntax nslices = self.get1(key, ['nslices']) # fetch nslices as a scalar.
# tables containing the attributes are joined if they are in the same search call
traces, rois = self.get(key, ['trace', 'roi']) |
Between the last two, I'd prefer the |
I agree with @eywalker although I'd still prefer to rename |
Do we have running candidates on what to rename |
I propose nslices = (rel & key).farfetch1['nslices']
traces = (rel & key).farfetch['traces'] |
I am removing this since this can lead to indeterministic behaviors. In the Pipeline Navigator and with new AI-based tools, we will provide tools for composing queries, but queries must be precise. |
Within
_make_tuples
functions, it may be possible to automate query formation for fetching data that can be uniquely identified by its attribute name.For example,
would be replaced with
This is intended to work from
_make_tuples
only since it will need to know its place in the data hierarchy and the value ofkey
.The text was updated successfully, but these errors were encountered: