Guest User

Untitled

a guest
Apr 16th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var OrientDB = require('orientjs');
  2.  
  3. var server = OrientDB({
  4. host: 'localhost',
  5. port: 2424,
  6. username: '<username>',
  7. password: '<password>'
  8. })
  9.  
  10. var db = server.use({
  11. name: 'mydb',
  12. username: '<username>',
  13. password: '<password>'
  14. })
  15.  
  16. db.class.get('Account')
  17. .then(function (MyClass) {
  18. MyClass.property.create([{
  19. name: 'name',
  20. type: 'String'
  21. },{
  22. name: 'password',
  23. type: 'String'
  24. },{
  25. name: 'email',
  26. type: 'String'
  27. }])
  28. .then(function () {
  29. console.log('Properties created')
  30. });
  31. })
  32.  
  33. server.close();
Add Comment
Please, Sign In to add comment