fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
124 stars 17 forks source link

path to in-memory (:memory:) database #28

Closed urbanze closed 3 years ago

urbanze commented 3 years ago

How can I get the absolute path to in-memory (:memory:) database? Sqlite in grafana need absolute path (disk file).

fr-ser commented 3 years ago

I don't see how this is supposed to work. Let's say you have a python application that used an in memory sqlite. That means, that the python database is created ephemerally and not on disk. No other program can access this.

urbanze commented 3 years ago

I don't see how this is supposed to work. Let's say you have a python application that used an in memory sqlite. That means, that the python database is created ephemerally and not on disk. No other program can access this.

Maybe it could get access to db through "in-memory-shared"/cached, with that, several processes can access this region in use by the main task. This can be done? (with some work to do).

fr-ser commented 3 years ago

I have never heard of a regular application that does this. This would be a super low level (as in hardware-specific maybe even) task. I can 100% guarantee, that I cannot achieve this, but Pull Requests are welcome.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

urbanze commented 3 years ago

solved with TMPFS! I created DB file inside directory mounted inside RAM (tmpfs) and now, I have path to use in grafana normally!