Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var OrientDB = require('orientjs');
- var server = OrientDB({
- host: 'localhost',
- port: 2424,
- username: '<username>',
- password: '<password>'
- })
- var db = server.use({
- name: 'mydb',
- username: '<username>',
- password: '<password>'
- })
- db.class.get('Account')
- .then(function (MyClass) {
- MyClass.property.create([{
- name: 'name',
- type: 'String'
- },{
- name: 'password',
- type: 'String'
- },{
- name: 'email',
- type: 'String'
- }])
- .then(function () {
- console.log('Properties created')
- });
- })
- server.close();
Add Comment
Please, Sign In to add comment