dbExistsTable,SQLiteConnection,character-method {RSQLite}R Documentation

Tables in a database

Description

dbExistsTable() returns a logical that indicates if a table exists, dbListTables() lists all tables as a character vector.

Usage

## S4 method for signature 'SQLiteConnection,character'
dbExistsTable(conn, name, ...)

## S4 method for signature 'SQLiteConnection'
dbListTables(conn, ...)

Arguments

conn

An existing SQLiteConnection

name

String, name of table. Match is case insensitive.

...

Needed for compatibility with generics, otherwise ignored.

See Also

The corresponding generic functions DBI::dbExistsTable() and DBI::dbListTables().

Examples

library(DBI)
db <- RSQLite::datasetsDb()

dbExistsTable(db, "mtcars")
dbExistsTable(db, "nonexistingtable")
dbListTables(db)

dbDisconnect(db)

[Package RSQLite version 1.1-2 Index]