Closed petervavro closed 5 years ago
- OrientDBClient.connect > ? (e.g. Before server is created ?)
At the boostrap of your application
- client.sessions > ?
At the boostrap of your application
- pool.acquire() > ?
When you need a session in the request for doing queries
- session.close() > ? (e.g.: After request ?)
When you are done with your logic
- pool.close() > ?
At the shutdown of the application
- client.close() > ? At the shutdown of the application
You can find an example here in a simple chat application with ExpressJS
Hi @petervavro
i've added the same example rewritten with async/await.
https://github.com/orientechnologies/orientjs-example
Let me know if it helps
Good question! Answer should be added to the docs!
Could you please specify when the following tasks are supposed to be performed from Node JS Architecture point of view.
OrientDBClient.connect > ? (e.g. Before server is created ?)
client.sessions > ?
pool.acquire() > ?
session.close() > ? (e.g.: After request ?)
pool.close() > ?
client.close() > ?
Thank you !