You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi folks, first let me say nodbi is a really great project that I hope keeps flourishing.
Is there a way to run raw database commands (for operations that nodbi currently does not implement), analogous to mongolite's run()?
I have also 2 aside questions if I may:
(1) How can I disconnect from the database? I could not find in nodbi a command like mongolite's $disconnect()
(2) Since in commands like docdb_query(key = "...") we cannot change the key (we would receive a warning message), why make mandatory to provide it every time? In mongolite, for example, $find() just requires the query paramater.
Thank you
The text was updated successfully, but these errors were encountered:
Hi and many thanks, sorry, could not reply earlier.
Are you looking to run a few specific commands across all backends? Which commands are you thinking of? If the command would not have analogous or corresponding commands across the backends, it may be easier to just call the backend-specific function, for example:
In analogy, the other backends can be used with a nodbi connection object.
Re (1): manually disconnecting is not necessary for several (e.g. PostgreSQL, MongoDB) if not all backends. A method could be added but R's garbage collection should be sufficient. Did you run into any problems?
Re (2): this is for consistency of the main parameters across nodbi functions. I will review if simplifying the function signature e.g. for nodbi::docdb_query() would be a good gain.
If the command would not have analogous or corresponding commands across the backends,
That's my case, I just thought it would be nice to use one single connection (in this case nodbi) for every possible operation. That being said, the trick of using dbc$... is handy and indeed reduces the hurdle.
(1) I've not run into problems yet, I will stick with the garbage collection solution and see if any issue appears.
(2) Understood.
I also opened this issue in connections package which I believe would be a great fit for nodbi.
Hi folks, first let me say
nodbi
is a really great project that I hope keeps flourishing.Is there a way to run raw database commands (for operations that
nodbi
currently does not implement), analogous to mongolite's run()?I have also 2 aside questions if I may:
(1) How can I disconnect from the database? I could not find in
nodbi
a command like mongolite's$disconnect()
(2) Since in commands like
docdb_query(key = "...")
we cannot change thekey
(we would receive a warning message), why make mandatory to provide it every time? In mongolite, for example,$find()
just requires thequery
paramater.Thank you
The text was updated successfully, but these errors were encountered: