Closed gitgkk closed 2 years ago
i think for hasCollection
you can do something like this:
let collection_exists = await db.collection("collection_name").exists();
not sure about hasGraph
though
You can do the same for Graph
: await db.graph("graph_name").exists()
I'm closing this as there is no significant advantage in having these aliased on the Database
object simply because pyArango went this way. The advantage of using the exists()
method is that you will need to perform any other operations via the Collection
or Graph
object anyway and there are very few scenarios where you only want to check for existence and do nothing else with that collection or graph (and in those, you can still do it as above).
Feel free to reopen if you think the API is insufficient.
I'm using the pyarango and the JS drivers on my project but the APIs are not the same on the JS side. The https://pyarango.readthedocs.io/en/latest/database/ has
both of which are very handy and create a clean code rather than using the current
My request is that the dev team implement an efficient version which works has the same interface and work like the pyarango api version cited above.
Thanks!