Skip to content

db.table() should only return tables, add db.view() #657

Closed
@simonw

Description

@simonw

Since 4.0 is happening:

Currently the library encourages db["name_of_table_or_view"] as the main way to access tables and views. This is a bit messy from a typing perspective because you might get back a View, which doesn't support .insert_all() etc.

To fix this, I want to switch to recommending this:

table = db.table("name_of_table")
table = db.view("name_of_table")

Currently the .table() method exists but it can also return views. This change would be breaking because using .table() with the name of a view would no longer work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions