Hi Omega,
you should be able to do something like
var newEmployee = db.newInstance("Employee");
newEmployee.field("name", "John");
newEmployee.save();
Luigi
2015-05-15 5:01 GMT+02:00 Omega Silva <[email protected]>:
> Hi Luigi,
>
> Thanks for the response. I'm executing this inside OrientDB (OFunction).
>
> On Thursday, May 7, 2015 at 2:43:43 PM UTC+5:30, Luigi Dell'Aquila wrote:
>>
>> Hi Omega,
>>
>> where are you executing this javascript code? Is it in a web page, in
>> Node.js or inside OrientDB (eg. an OFunction)?
>>
>>
>>
>> 2015-05-07 5:59 GMT+02:00 Omega Silva <[email protected]>:
>>
>>> Hi all,
>>>
>>> The Java API facilitates creating documents in the following style;
>>>
>>> ODocument newEmployee = new ODocument("Employee");
>>> newEmployee.field("name", "John");
>>> newEmployee.save();
>>>
>>> Does the JavaScript API have something similar?
>>>
>>> Cheers.
>>> Omega
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.