[#2] Database integration complete.

Posts and Authors can now be inserted and retrieved from the database
created. It was decided to use a SQLite database for it high read spead
and ease of use/maintenance.

A build feature was created to seperate how the library is being used.
If you are making the database and storing posts, then use the publisher
flag. If you are just reading from a database then do not use the
publisher flag. This was also set to change the tale contents from a
PathBuf to the String of HTML blog data without having to create a whole
new data object.

An example and a test were made. Test coverage needs to be increased
however.
This commit is contained in:
2025-08-27 17:36:06 -04:00
parent 9dd87d0e42
commit ab83c7afb6
10 changed files with 976 additions and 52 deletions

View File

@ -11,5 +11,16 @@ license = "Apache-2.0"
[dependencies]
chrono = { version = "0.4.41", features = ["serde"] }
pulldown-cmark = "0.13.0"
rusqlite = "0.37.0"
serde = { version = "1.0.219", features = ["derive"] }
toml = "0.9.5"
# When switching to PostgreSQL use feature: "sqlx-postgres"
#sea-orm = { version = "1.1.14", features = [ "sqlx-sqlite",
# "runtime-tokio-native-tls",
# "macros" ] }
[features]
publisher = []