![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
orientdb-rest-api
Advanced tools
A node.js driver for OrientDB using the OrientDB RESTful HTTP protocol
A Node.js driver to talk to the OrientDB REST API
Very basic http wrapper using axios based on node-orient-http and tested on OrientDb 2.2.31
npm install orientdb-rest-api
const OrientDB=require('orientdb-rest-api');
const db = new OrientDB({
user: 'root',
password: 'root_passwd',
host: 'http://localhost:2480',
database: 'GratefulDeadConcerts',
})
db.connect().then(async ()=>{
const result=await db.query('select * from V where name = ?',["Batman"])
console.log(result)
}).catch(err=>{
console.error(err.message)
})
Syntax:
db.query(query, parameters, limit, fetchplan)
db.command(query, parameters, limit, fetchplan)
Examples:
db.command('insert into V set name = ?', ["Batman"]).then(async ()=>{
// named parameters, no limit
const res=await db.query('select * from V where name = :name', {
name: "Batman"
})
db.command('select * from V where name = ?', ["Batman"], 1).then(successHandler)
}).catch((err)=>console.error(err))
Response will be something like:
{
"result": [
{
"@type": "d",
"@rid": "#9:12",
"@version": 1,
"@class": "V",
"name": "Batman"
}
]
}
All methods return a Promise, see axios for more information
See OrientDB-REST API for a list of commands
// general api
db.get(command, queryParams)
db.delete(command, queryParams)
db.head(command, queryParams)
db.post(command, queryParams, postBody)
db.put(command, queryParams, postBody)
db.patch(command, queryParams, postBody)
// create
db.post('document', null, { '@class': 'V', name: 'Gustavo Salome'})
.then(successHandler)
.catch(errorHandler)
// deleting, should return true
db.delete('document', '9:1')
.then(successHandler)
.catch(errorHandler)
// create as command, should return the new record
db.command('insert into V set name = "Batman"')
.then(successHandler)
.catch(errorHandler)
db.query('select * from V where name = "Batman"').then((res)=>{
console.log(res)
}).catch(err=>{
console.log(err.message)
})
db.language('gremlin').query("g.V('@class', 'User')").then(successHandler2).catch(errorHandler2)
const db = new OrientDB({
user: 'root',
password: 'root_passwd',
host: 'http://localhost:2480',
database: 'GratefulDeadConcerts',
})
db.connect()
db.disconnect()
// once connected
db.once('connected', (response)=>{
console.log('yes! connected')
})
// on any error
db.on('error',(message, err)=>{
console.log(message, err)
})
db.once('disconnected', (response)=>{
console.log('bye!')
})
const OrientDB=require ('orientdb-rest-api')
const db=new OrientDB({
user: 'root',
password: 'password',
host: 'http://localhost:2480',
database: 'GratefulDeadConcerts',
})
const config=require('./config/local')
const db=new OrientDB(config)
db.connect().then(async (res)=>{
console.log(res) // true
res=await db.command('insert into V set name = ?', ["Batman"])
console.log(res) // Object containing the new record
res=await db.query('select * from V where name = :name', {
name: "Batman"
})
console.log(res) // Object containing the fetched record
res=await db.command('select * from V where name = ?', ["Batman"], 1)
console.log(res) // Same object containing the fetched record
res=await db.delete('document', res.result[0]['@rid'])
console.log(res) // true
res=await db.disconnect()
})
db.on('connected',(res)=>{
console.log('connected')
})
db.on('error',(message, err)=>{
console.log(message)
process.exit()
})
db.on('disconnected',(res)=>{
console.log('disconnected')
})
See OrientDB-REST API for more docs.
Listening for error events
db.on('error',(message, err)=>{
console.log(message, err)
})
db.query('error query').catch((err)=>{
console.log(err.message)
})
See Axios Error Handling for more information
1.0.0
FAQs
A node.js driver for OrientDB using the OrientDB RESTful HTTP protocol
The npm package orientdb-rest-api receives a total of 1 weekly downloads. As such, orientdb-rest-api popularity was classified as not popular.
We found that orientdb-rest-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.