Skip to content

Instantly share code, notes, and snippets.

@Siron
Created November 9, 2015 17:03
Show Gist options
  • Save Siron/a36d0d17065b91eb4f91 to your computer and use it in GitHub Desktop.
Save Siron/a36d0d17065b91eb4f91 to your computer and use it in GitHub Desktop.
Generic DB functions
var Repository = function(model) {
};
Repository.prototype.get = function(id) {
};
Repository.prototype.find = function(query) {
};
Repository.prototype.list = function(query, options) {
};
Repository.prototype.count = function(query) {
};
Repository.prototype.create = function(data) {
};
Repository.prototype.update = function(id, data) {
};
Repository.prototype.delete = function(id, data) {
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment