Questions tagged [orientjs]

Official orientdb driver for node.js. Fast, lightweight, uses the binary protocol.

This driver wraps the most common use cases in database usage. All parameters required by methods or constructor are Strings. This library works on top of HTTP RESTful protocol.

Reference

75 questions
12
votes
1 answer

Connection pool in OrientJS

I want to use OrientJS with Express.js. How do I configure a connection pool before any http request is made, acquire and release a connection from the pool during the request/response cycle, and finish the pool when I shutdown the app?
André
  • 12,497
  • 6
  • 42
  • 44
5
votes
3 answers

How do you do an 'Insert if not exists' using orientjs?

What is the idiomatic way for doing an 'insert if not exists'? Can this be done without transactions?
4
votes
3 answers

OrientDB get Edges with shortestPath()

I have a Question about the shortestPath() Function of OrientDB. If I Query select shortestPath('#9:1', '#15:1', 'BOTH') against a OrientDB I just get the Vertex of the Path. But I also want the Edges between them. How can I SELECT both, the Vertex…
Marvin K
  • 334
  • 3
  • 14
4
votes
2 answers

OrientJS: How to get standard JSON (serialized) from query

I don't understand how to get standard JSON back from an orientjs query. I see people talking about "serializing" the result, but I don't understand why or how to do that. There is a toJSON() method, but i only see it being used with fetchplans…
kurtcorbett
  • 1,355
  • 1
  • 12
  • 17
4
votes
1 answer

orientjs and expressjs 4 integration

I'm trying to do the orientjs and express 4 integration. I'm confusing with how to make a route to index.js. Since orientjs has just launced, I still can't find any tutorial. Now I just want to make a simple select from the orientdb. Could anyone…
3
votes
1 answer

How to deal with SQL Injection in OrientDB using nodejs?

I'm using the orientjs library to perform operations in the Orient Database. I read in the documentation that it's possible to use parameter-style queries like the following: db.query( 'SELECT name, ba FROM Player ' + 'WHERE ba >= :ba AND team…
iamdeit
  • 5,485
  • 4
  • 26
  • 40
3
votes
2 answers

orientjs - how to perform bulk insert

orientdb.insert() .into('User') .set({name: 'John', surname: 'Smith'}) .all() .then(function(result) { ... }, function(error){ ... }) This is the way to insert a single vertex in OrientDb via orientjs. How to…
Kiril Kirilov
  • 11,167
  • 5
  • 49
  • 74
3
votes
1 answer

Render multiple queries to the same jade template

Client asks for dynamic information that will be served into 2 tables or lists in the same webpage. Lets say for example, to compare between 2 objects or articles. JADE TEMPLATE extends layout.jade block content1 div= foo_table block content2 …
Samuel
  • 105
  • 6
2
votes
1 answer

OrientJS: Store binary data alongside "normal" attributes

I would like to use OrientDB as a database for .csv files and store these in the original form in a binary field of a record using OrientJS. Additionally, I would like to store a name and a description as Strings. I worked through the documentation…
NoItAll
  • 21
  • 3
2
votes
0 answers

How to create over 60,00,000 edges in seconds in OrientDB

I want to create over 60,00,000 edges in few minutes(within 30 minutes) in OrientDB. Is it Possible ?? values for each edge is taking from a text file and using Node JS filestream's readline (used version Node 4.x.x LTS version) I have tried from…
Anijit Sau
  • 555
  • 2
  • 8
  • 25
2
votes
0 answers

linkedType" not getting while making "MyClass.property.list()" node js, orientjs

when i am trying to get all property of class but not getting "LinkedType" is it possible to get all property details including "LinkedType" and "LinkedClass" thank you Abhishekstrong text
2
votes
1 answer

Orientdb fetch relationship as array in json

I want to fetch the vertices connected by the edge to be returned as an array as a property in json. Eg: If a POST has 10 comments the query should return something like this. { @class: Post, postTitle: "Some title", comments: [ …
Konza
  • 2,143
  • 17
  • 30
2
votes
1 answer

Orient js which method should we use to create a new vertex and why

I am using orientjs version: 2.1.0 and orientdb version 2.1.6 community edition From the github docs I found that there are 2 ways to create a new Vertex. Here is the first method db.create('VERTEX', 'User') .set(newUser) .one() …
Konza
  • 2,143
  • 17
  • 30
2
votes
0 answers

Second call to server.exists() fails with `Server user not authenticated` error

We have the following scenario: Call server.exists() Select user vertices Call server.exists() The result is a failure on the 3rd step. More details and a reduced use-case: const OrientDB = require('orientjs') const server = OrientDB({ "host":…
Adrian Lynch
  • 8,237
  • 2
  • 32
  • 40
2
votes
1 answer

connection timeout OrientDB with Javascript API

In my webapp client side script I'm using the OrientDB Javascript API (orientdb-api.js). When the script initializes I run this code: var orientdb = new ODatabase("http://localhost:2480/testapp"); var orientdbinfo = orientdb.open('root',…
Lurch
  • 137
  • 1
  • 9
1
2 3 4 5