Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
c0709481
Vérifiée
Valider
c0709481
rédigé
2 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
DB: Impl load_all and clear history
parent
6cd8cc2a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/rust/lektor_db/src/connexion.rs
+9
-2
9 ajouts, 2 suppressions
src/rust/lektor_db/src/connexion.rs
src/rust/lektor_db/src/types.rs
+4
-0
4 ajouts, 0 suppression
src/rust/lektor_db/src/types.rs
avec
13 ajouts
et
2 suppressions
src/rust/lektor_db/src/connexion.rs
+
9
−
2
Voir le fichier @
c0709481
...
...
@@ -186,12 +186,19 @@ impl LktDatabaseConnection {
/// Returns the queue history.
pub
fn
history
(
&
mut
self
)
->
LktDatabaseResult
<
Vec
<
i64
>>
{
todo!
()
Ok
(
with_dsl!
(
history
=>
history
.select
(
id
)
.order_by
(
epoch
.desc
())
.load
::
<
i64
>
(
&
mut
self
.sqlite
)
?
))
}
/// Clears the history.
pub
fn
clear_history
(
&
mut
self
)
->
LktDatabaseResult
<
()
>
{
todo!
()
with_dsl!
{
history
=>
{
diesel
::
delete
(
history
)
.execute
(
&
mut
self
.sqlite
)
?
;
Ok
(())
}}
}
/// Search the history by URIs. We return the local ids.
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/rust/lektor_db/src/types.rs
+
4
−
0
Voir le fichier @
c0709481
//! Types exported by the database crate.
//! TODO: Use [bumpalo](https://docs.rs/bumpalo/3.12.0/bumpalo/) to reduce
//! allocation counts?
use
hashbrown
::
HashMap
;
pub
struct
KaraInfo
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter