Michael Szer Michael Szer - 1 year ago 96
MySQL Question

How to make a Queries from the server in Node.js to the database OrientDB

My question is:

  • How do you make Queries from the Server to the Database?

I have been reading some articles and seeing some tutorials from Udemy about OrientDB, I found about what is a Query Language, like SQL, but I couldn't find how to send a Query from the Server to the DataBase OrientDB . I am making the server in Node.js.

I found how to start the connection and close it:

var OrientDB = require('orientjs');

var server = OrientDB({
host: 'localhost',
port: 8082, //I am using the port 8081 for Binary and 8082 for Http
username: 'root',
password: 'rootPassword'


I have been reading the OrientDB Documents but I couldn't find it. http://orientdb.com/docs/last/index.html

Answer Source

all you need is just search in the official documentation



var targetAvg = 0.3;
var targetTeam = 'Red Sox';

var hitters = db.query(
   'SELECT name, battavg FROM Player WHERE battavg >= :ba AND team = :team',
   {params: {
      ba: targetAvg,
      team: targetTeam
    },limit: 20 }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download