memory-orm
Version:
client side ORM + map reduce
38 lines (37 loc) • 897 B
JavaScript
Object.defineProperty(exports, '__esModule', { value: true })
exports.Structure = exports.Struct = void 0
class Struct extends Array {
get id() {
return this[0]
}
static bless(o) {
Reflect.setPrototypeOf(o, this.prototype)
}
static deploy(struct) {}
static update(item, old) {}
static create(item) {}
static delete(old) {}
static map_partition(item, emit) {}
static map_reduce(item, emit) {}
static order(item, emit) {}
}
exports.Struct = Struct
function Structure(labels, get) {
class struct extends Struct {}
labels.forEach((label, idx) => {
Object.defineProperty(struct.prototype, label, {
enumerable: true,
get() {
return this[idx]
},
})
})
Object.defineProperty(struct.prototype, 'id', {
enumerable: true,
get,
})
return struct
}
exports.Structure = Structure
//# sourceMappingURL=struct.js.map