AscendingCreations / AxumSession

Axum Session Management Libraries that use Sqlx
MIT License
142 stars 29 forks source link

Fix the table delete syntax for sqlite #33

Closed cold-brewed closed 1 year ago

cold-brewed commented 1 year ago

The current delete_all method for sqlite uses TRUNCATE which causes clear_store() to fail:

Error: error returned from database: (code: 1) near "TRUNCATE": syntax error
Caused by:
    (code: 1) near "TRUNCATE": syntax error

This is just a small fix to change TRUNCATE over to DELETE FROM to achieve the same result (sqlite docs reference). It seems to work for me so far, but I'm not sure if there's anything else I should be looking out for.

Thanks for the crate!

genusistimelord commented 1 year ago

thank you.