Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This reverts commit ab04d88ae84c33f3577870c10378f0166adf27bc.
Having a progress bar for establishing the database connection was just too much
noise visually.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
We have to manually implement Debug here, because otherwise we would
print the database password in the debug output, which is CLEARLY a bad
idea.
Hence, change the debug!() call in the establish_connection() function
to (debug-)print `self` and hand-implement the `Debug` trait.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This refactors the parsing of the `DbConnectionConfig` object and the
establishing of the connection to be member functions of the type, rather than
free functions. Way more idomatic.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This is actually an antipattern, because one should rather implement `ToString`
(or rather `Display`).
But because our type is nothing that would be displayed anyways, remove it
entirely.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch refactors the database connection setup code to involve less copying
of data in memory.
It also changes the configuration value type of the database port and the
database connection timeout setting to be `u16` instead of `String`, which is
another improvement.
Because the `DbConnectionConfig` type no longer holds owned values, it must be
annotated with a lifetime. Usages were adapted.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch adds support for a database connection timeout, giving the user the
option to configure one, but hardcoding a default timeout to 30 seconds.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Diesel is an exception here, because the generated src/schema.rs file
does not automatically contain the necessary imports.
All imports were added where necessary.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|