Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The example & real code currently don't work. #2

Closed
runexec opened this Issue · 2 comments

2 participants

Ryan Kelker Worms David
Ryan Kelker

Below is an error I recieved after trying to run your example code. I tried running the example, because my own code would not work. I would really like to use your project in my project if you could give me a hand here...

  $ node example.js                                     

  node.js:201                                    
          throw e; // process.nextTick error, or 'error' event on first tick                                    
                ^                                    
  TypeError: Cannot call method 'property' of undefined                                    
      at Object.<anonymous> (/project/test/models/example.js:10:7)                                    
      at Module._compile (module.js:441:26)                                    
      at Object..js (module.js:459:10)                                    
      at Module.load (module.js:348:31)                                    
      at Function._load (module.js:308:12)                                    
      at Array.0 (module.js:479:10)                                    
      at EventEmitter._tickCallback (node.js:192:40)                                    

  $ cat example.js                                     
  ron = require('../lib/ron');                                    
  // Client connection                                    
  client = ron({                                    
      port: 6379,                                    
      host: '127.0.0.1',                                    
      name: 'auth'                                    
  });                                    
  // Schema definition                                    
  Users = client.get('users');                                    
  Users.property('id', {identifier: true});                                    
  Users.property('username', {unique: true});                                    
  Users.property('email', {index: true, type: 'email'});                                    
  Users.property('name', {});                                    
  // Record manipulation                                    
  Users.create(                                    
      {username: 'ron', email: 'ron@domain.com'},                                    
      function(err, user){                                    
          console.log(err, user.id);                                    
      }                                    
  )                                    
Worms David
Owner

I will look at the example when i have time but i'll be surprise they would work as I haven't touch them since a long time. Look at the test cases, they are no commit with a failure

Worms David
Owner

I've just commit the sample in the readme into './samples/create.js'. I also checked its validity.

Worms David wdavidw closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.