Age | Commit message (Collapse) | Author |
|
Because tokio 1.0 does not ship with the Stream trait, this patch also
introduces tokio_stream as new dependency.
For more information, look here:
https://docs.rs/tokio/1.0.3/tokio/stream/index.html
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch cleans some rustfmt code that was formatted, but where clippy
had something to complain: a scope was unnecessary here, so remove it.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch updates the implementation for the dedicated release table.
First of all, it updates the model types and adds the new
`crate::db::models::Release` type for representing releases in the
database (which are just pointers to the released artifact).
The `db artifacts` command is updated by using a LEFT JOIN with the
"releases" table.
The `release` command is updated as well, though the change was a bit
more complex.
First of all, a LEFT OUTER JOIN was added which is essentially the same
as the filter for un-released artifacts from before the change.
Then, a `.select()` call was added, so we don't load all the objects we
don't need anyways.
This reduces overhead not only with the database querying but also in
the code here, as we do not allocate objects from the database we
destruct right away.
The updating of the artifact object in the database was changed to
generate a new release object in the "releases" table, of course.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
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>
|