Embedded lua: sql calls

All,
I can run the SQlite browser against library.db and extract some interesting statistics.

I am also aware of this statistics package with sql statements.

It would be nice to query statistics inside darktable, be able to run set up queries in a simple way and run them against the database.

I have looked around the api documentation and various lua scripts, and could very well have missed what I am looking for. If you know of an example showing how to get to the library.db via embedded lua and be able to execute sql statements, I would be grateful for a link/hint :slight_smile:

/Per

1 Like

Just a quick check shows that dt database is available via c bindings darktable/database.c at master · darktable-org/darktable · GitHub

Also Using Lua with darktable | darktable

Thanks @andy
I will study both links and see where that takes me.

1 Like