diff --git a/.gitignore b/.gitignore index 8b037b5b..b1c241c5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ Cargo.lock .idea/ .vscode/ examples/*/target -test_db*.sqlite +*.sqlite diff --git a/README.md b/README.md index 75f9ffcf..dca16841 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,11 @@ [functional reactive design]: https://en.wikipedia.org/wiki/Functional_reactive_programming [other adaptors]: https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html - - **Dialogues management subsystem.** We have designed our dialogues management subsystem to be easy-to-use, and, furthermore, to be agnostic of how/where dialogues are stored. For example, you can just replace a one line to achieve [persistence]. Out-of-the-box storages include [Redis]. + - **Dialogues management subsystem.** We have designed our dialogues management subsystem to be easy-to-use, and, furthermore, to be agnostic of how/where dialogues are stored. For example, you can just replace a one line to achieve [persistence]. Out-of-the-box storages include [Redis] and [Sqlite]. [persistence]: https://en.wikipedia.org/wiki/Persistence_(computer_science) [Redis]: https://redis.io/ +[Sqlite]: https://www.sqlite.org - **Strongly typed bot commands.** You can describe bot commands as enumerations, and then they'll be automatically constructed from strings — just like JSON structures in [serde-json] and command-line arguments in [structopt]. @@ -371,6 +372,7 @@ The second one produces very strange compiler messages due to the `#[tokio::main ## Cargo features - `redis-storage` -- enables the [Redis] support. + - `sqlite-storage` -- enables the [Sqlite] support. - `cbor-serializer` -- enables the [CBOR] serializer for dialogues. - `bincode-serializer` -- enables the [Bincode] serializer for dialogues. - `frunk` -- enables [`teloxide::utils::UpState`], which allows mapping from a structure of `field1, ..., fieldN` to a structure of `field1, ..., fieldN, fieldN+1`. diff --git a/examples/sqlite_remember_bot/sqlite.db b/examples/sqlite_remember_bot/sqlite.db deleted file mode 100644 index 41ade9e5..00000000 Binary files a/examples/sqlite_remember_bot/sqlite.db and /dev/null differ diff --git a/examples/sqlite_remember_bot/sqlite.db-shm b/examples/sqlite_remember_bot/sqlite.db-shm deleted file mode 100644 index 7f9864c7..00000000 Binary files a/examples/sqlite_remember_bot/sqlite.db-shm and /dev/null differ diff --git a/examples/sqlite_remember_bot/sqlite.db-wal b/examples/sqlite_remember_bot/sqlite.db-wal deleted file mode 100644 index c3cc68bf..00000000 Binary files a/examples/sqlite_remember_bot/sqlite.db-wal and /dev/null differ diff --git a/examples/sqlite_remember_bot/src/main.rs b/examples/sqlite_remember_bot/src/main.rs index e095150a..f48ed648 100644 --- a/examples/sqlite_remember_bot/src/main.rs +++ b/examples/sqlite_remember_bot/src/main.rs @@ -43,7 +43,7 @@ async fn main() { let dialogue = dialogue.expect("std::convert::Infallible"); handle_message(cx, dialogue).await.expect("Something wrong with the bot!") }, - SqliteStorage::open("sqlite.db", JSON).await.unwrap(), + SqliteStorage::open("db.sqlite", JSON).await.unwrap(), )) .dispatch() .await;