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
dbExistsTable borks when conn is a SQLiteConnection and name is an Id with schema = "INFORMATION_SCHEMA" and table = "TABLES". I was expecting it to return FALSE.
library(DBI)
conn<- dbConnect(RSQLite::SQLite(), ":memory:")
dbExistsTable(conn, Id(schema="INFORMATION_SCHEMA", table="TABLES"))
# Error: no such table: INFORMATION_SCHEMA.sqlite_master
dbDisconnect(conn)
The text was updated successfully, but these errors were encountered:
After a bit of Googling, my understanding is that schemas in SQLite (here I am using the word schema to mean the part before the . in schema.table) are the names of the ATTACHed databases. It seems like the only way there could ever be a schema other than "main" would be if ATTACH is used in a SQL statement.
The following code returns a character vector of the attached databases:
dbGetQuery(conn, "SELECT name FROM pragma_database_list;")$name
I'll see if I can find a good place to put a check.
kjellpk
added a commit
to kjellpk/RSQLite
that referenced
this issue
Mar 6, 2024
dbExistsTable
borks whenconn
is aSQLiteConnection
andname
is anId
withschema = "INFORMATION_SCHEMA"
andtable = "TABLES"
. I was expecting it to returnFALSE
.The text was updated successfully, but these errors were encountered: