Skip to content

Commit

Permalink
WIP: testing new Diesel MultiConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDex committed Aug 18, 2023
1 parent 631b748 commit d0f4b8a
Show file tree
Hide file tree
Showing 9 changed files with 505 additions and 553 deletions.
219 changes: 131 additions & 88 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ publish = false
build = "build.rs"

[features]
# default = ["sqlite"]
default = [
# "sqlite"
# "sqlite","postgresql"
"sqlite","postgresql","mysql"
]
# Empty to keep compatibility, prefer to set USE_SYSLOG=true
enable_syslog = []
mysql = ["diesel/mysql", "diesel_migrations/mysql"]
Expand Down Expand Up @@ -166,6 +170,11 @@ rpassword = "7.2.0"
[patch.crates-io]
rocket = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'ce441b5f46fdf5cd99cb32b8b8638835e4c2a5fa' } # v0.5 branch
# rocket_ws = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'ce441b5f46fdf5cd99cb32b8b8638835e4c2a5fa' } # v0.5 branch
# diesel = { path = '../../diesel/diesel' }
# diesel_migrations = { path = '../../diesel/diesel_migrations' }
diesel = { git = 'https://github.com/diesel-rs/diesel', branch = "master" }
diesel_migrations = { git = 'https://github.com/diesel-rs/diesel', branch = "master" }


# Strip debuginfo from the release builds
# Also enable thin LTO for some optimizations
Expand Down
3 changes: 2 additions & 1 deletion src/api/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ use crate::{
db::{backup_database, get_sql_server_version, models::*, DbConn, DbConnType},
error::{Error, MapResult},
util::{
docker_base_image, format_naive_datetime_local, /*get_display_size,*/ get_reqwest_client, is_running_in_docker,
docker_base_image, format_naive_datetime_local, /*get_display_size,*/ get_reqwest_client,
is_running_in_docker,
},
CONFIG, VERSION,
};
Expand Down
5 changes: 4 additions & 1 deletion src/api/web.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::path::{Path, PathBuf};

use rocket::{fs::NamedFile, http::ContentType, /*response::content::RawHtml as Html,*/ serde::json::Json, /*Catcher,*/ Route};
use rocket::{
fs::NamedFile, http::ContentType, /*response::content::RawHtml as Html,*/ serde::json::Json,
/*Catcher,*/ Route,
};
use serde_json::Value;

use crate::{
Expand Down
1 change: 0 additions & 1 deletion src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use std::num::NonZeroU32;
use data_encoding::Encoding;
use ring::{digest, pbkdf2};


static DIGEST_ALG: pbkdf2::Algorithm = pbkdf2::PBKDF2_HMAC_SHA256;
const OUTPUT_LEN: usize = digest::SHA256_OUTPUT_LEN;

Expand Down
Loading

0 comments on commit d0f4b8a

Please sign in to comment.