I’m trying to use the DatabaseConnection smart cell in a livebook to query a SQLite database.
When I connecti it, it says:
{:ok, #PID<0.293.0>}
But If I try creating a query it fails with {:error, :invalid_connection}
when I run:
{:ok, statement} = Exqlite.Sqlite3.prepare(c2, "select * from table")
In fact it works if I create a connection manually:
{:ok, c2} =Exqlite.Sqlite3.open("my.db")
But the connection is different - it’s a reference not a PID:
{:ok, #Reference<0.4102545559.2337144860.146613>}
So how do I use the smartcell’s own connection? I’m sure I’m missing something trivial. With MySql it just works.