Skip to content

Return a list of the registered table names

Description

Return a list of the registered table names

Usage

<SQLContext>$tables()

Details

This method will return the same values as the "SHOW TABLES" SQL statement, but as a vector instead of a frame.

Value

A character vector

Examples

library("polars")

# Executing as SQL:
frame_data <- pl$DataFrame(x = 1)
ctx <- pl$SQLContext(hello_world=frame_data, foo = data.frame(x = 2))
ctx$execute("SHOW TABLES")$collect()
#> shape: (2, 1)
#> ┌─────────────┐
#> │ name        │
#> │ ---         │
#> │ str         │
#> ╞═════════════╡
#> │ foo         │
#> │ hello_world │
#> └─────────────┘
# Calling the method:
ctx$tables()
#> [1] "foo"         "hello_world"