Skip to content

SQLite Backend hard coded filename #169

Closed
@FridayPush

Description

@FridayPush

The Documentation for SQLite Backend does not mention the init_from_file function that is necessary to have the Table created. However that file has a hard coded "./mydb.sqlite", location. However if I pass in a connection and table using the example provided:

conn = sqlite3.connect(
    "async_test.sqlite",
    isolation_level="EXCLUSIVE",
    check_same_thread=False,
)
bucket = SQLiteBucket(rates, conn, "pyrate_table")

The table pyrate_table does not exist and the job fails with:

sqlite3.OperationalError: no such table: pyrate_table

Seems like there are a couple of possible action items:

  • Allow filename path for init_from_file
  • During SQLiteBucket initialization observe whether the table_name exists, and create if not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions