0.1.2 • Published 11 years ago

redis-mapper v0.1.2

Weekly downloads
16
License
-
Repository
github
Last release
11 years ago

##redis-mapper

Create models, save objects, and find them later.

This project currently only works with objects one layer deep utilizing strings. Other primitives will be added along with sub objects and arrays.

##Model

CustomerModel = mapper.modelFactory('Customer',
    {
        first_name: '',
        last_name:  ''
    }
);

##Save

CustomerModel.save(
    {
        first_name: 'thomas',
        last_name:  'silva'
    },
    function(id) {

    }
);

##Find

CustomerModel.find(
    [{type: 'string', attribute: 'first_name', value: 'thomas'}], function(customer) {

        console.log(customer.first_name);
    }
);
0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago