Giter VIP home page Giter VIP logo

redpanda's People

Contributors

mcsimps2 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

redpanda's Issues

Remove lodash dependency

This will make the codebase more lightweight. Lodash is only used a couple times and is not necessary.

Use foreignkey.fetch syntax for foreign keys

Instead of “await obj.foreignRef”, instead have “obj.foreignRef.fetch()” return the promise, and load this class with just the id so you can do “obj.foreignRef.id” without having to do a fetch.

Allow nulls in setter

This code doesn't look like it'll allow null values

if (schema[property.toString()].describe()['type'] === 'dbref') {
                        if (typeof value === 'string') {
                            
                            return Reflect.set(target, '__id__' + property.toString(), value)
                                    && Reflect.set(target, '__obj__' + property.toString(), null);
                        }
                        else if (value instanceof Document) {
                            return Reflect.set(target, '__id__' + property.toString(), value.id)
                                    && Reflect.set(target, '__obj__' + property.toString(), value);
                        }
                        else {
                            throw new Error("Can only set a foreign reference with an id or Document subclass instance")
                        }
                    }

Support embedded references

For example, a dictionary field that maps to IDs. Right now, support is only for individual fields and arrays of foreign references.

Document ability to specify non-RedPanda types

There is support for non-RedPanda types.

For example, when specifying a schema, it is possible to do
{
business: RedPanda.types.dbref().collection('business')
}

instead of {
business: RedPanda.types.dbref().collection(BusinessDocument)
}
because we may not have created a BusinessDocument type (perhaps we are migrated to RedPanda ODM). In this case, a snapshot is returned instead of a BusinessDocument. Add documentation about this.

Also add documentation about the ability to access the underlying doc reference, snapshot, collection, etc...

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.