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
The function SQLite.tables(db) returns a NamedTuple like (name=["table1", "table2"],), but if there are no tables, it's just an empty NamedTuple(). This makes it a bit tricky to do something like if "blah" in SQLite.tables(mydb).name....
MWE:
julia> using SQLite
julia> db = SQLite.DB()
SQLite.DB(":memory:")
julia> SQLite.tables(db)
NamedTuple()
julia> for _ in 1:5; (a=rand(10), b=collect(1:10)) |> SQLite.load!(db); end
julia> SQLite.tables(db)
(name = ["sqlitejl_z3Fcq", "sqlitejl_8BDzG", "sqlitejl_L23C9", "sqlitejl_pvmFu", "sqlitejl_SFEBB"],)
Is there any time that tables() returns something with other columns?