Giter Club home page Giter Club logo

Comments (4)

dimitri-yatsenko avatar dimitri-yatsenko commented on September 26, 2024

Yes, many things can and should be computed on the fly rather than being stored. Currently this can be done in a number of ways and I am not sure if binding this into fetch would be the cleanest option. For example, how would users know that this extra field is available? Would it be included in the table declaration? Or should these fields somehow be added to the table heading?

Would you like to flesh this out a bit?

from datajoint-matlab.

wrongu avatar wrongu commented on September 26, 2024

I mentioned fetch because it was the first thing that comes to mind. I liked the idea of updating the table declaration (e.g. annotated with a new 'volatile' data type) so that in a given table/class, all fields and their descriptions appear in the same place. To compute these fields would require some extra callbacks and indirection, so you're right that it's probably not the cleanest option.

A cleaner option, perhaps, would be to simply describe extra fields as comments in the declaration, then make my own get_xyz(self, key) function for each field xyz.

from datajoint-matlab.

dimitri-yatsenko avatar dimitri-yatsenko commented on September 26, 2024

The self.get_xyz(key) solution is what people do now. You must be careful though since sequential fetch calls are not guaranteed to return the same things in the same order. So if you need other attributes from the same table along with xyz, you better get them in one fetch and then compute xyz for each item in the sequence.

from datajoint-matlab.

wrongu avatar wrongu commented on September 26, 2024

Thanks!

from datajoint-matlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.