| Crates.io | scoreboard_db |
| lib.rs | scoreboard_db |
| version | 0.2.1 |
| created_at | 2023-10-21 11:48:05.928226+00 |
| updated_at | 2023-10-21 11:48:05.928226+00 |
| description | Library that provides a database connection for the scoreboard for an in house code challenge server |
| homepage | https://github.com/bitbrain-za/scoreboard-db-rs |
| repository | https://github.com/bitbrain-za/scoreboard-db-rs |
| max_upload_size | |
| id | 1009990 |
| size | 20,339 |
Simple lib to interact with the code challenge scoreboard DB.
Setup a MySQL test DB called code_challenge. Located on port 3306
export DB_PASS=<password>
cargo test
Your main interface is the scoreboard module and you should ise it thusly
use scoreboard::ScoreBoard;
let mute scoreboard = Scoreboard::new(scores);
let scoreboard = ScoreBoard::new(scores);
let filters = Builder::new()
.add_filter(Filter::Player(vec!["foo".to_string()]))
.add_filters(Filter::Sort())
.build();
let scores = scoreboard.display(Some(&filters));