Hello ๐
I'm Samy, CTO and co-founder of GitBook.com โ We are hiring โ You can also find me on Twitter as @SamyPesse.
Modern ORM for MongoDB based on immutable data structure and promises.
Home Page: https://docs.blini-js.org
License: Apache License 2.0
Hello ๐
I'm Samy, CTO and co-founder of GitBook.com โ We are hiring โ You can also find me on Twitter as @SamyPesse.
This is a feature supported by Mongoose.
For example for a schema like:
const postSchema = new Schema({
author: Type.Ref('User')
});
The query
const currentUser = new User(...);
Post.find({
author: currentUser
});
should correctly transform currentUser
into currentUser._id
.
Type
should have a method toQuery(value)
.
Implementation by mongoose is done in lib/cast.js
The example application should a fully runnable web-application.
Documented by 3eaefde
Documentation is already started: https://github.com/SamyPesse/blini/blob/master/docs/discriminators.md
Should Blini have a plugin API to extend models (for example to have plugins like mongoose-plugin-created
or mongoose-plugin-modified
.
Plugins can be function retuning plain mixin:
function CreatedPlugin(options) {
return {
save() {
...
}
};
}
Plugins could be added as mixin:
class Post extends Model(postSchema) {
mixins: [createdPlugin]
}
Mixins are no longer an advised solution for modern frameword (ex: React: Mixins Considered Harmful
function CreatedPlugin(Model) {
class ExtendedModel extends Model {
save() {
}
}
return ExtendedModel;
}
And plugin can be use with an helper Model.withPlugins
to chain the composition:
module.exports = Model.withPlugins([
CreatedPlugin
]);
Documented by 3eaefde
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.