MCPcopy Create free account
hub / github.com/Moosync/Moosync / update_song

Method update_song

src-tauri/database/src/database.rs:344–355  ·  view source on GitHub ↗
(&self, song: QueryableSong)

Source from the content-addressed store, hash-verified

342
343 #[tracing::instrument(level = "debug", skip(self, song))]
344 pub fn update_song(&self, song: QueryableSong) -> Result<()> {
345 trace!("Updating song");
346 if let Some(id) = song._id.as_ref() {
347 update(allsongs.filter(schema::allsongs::_id.eq(id.clone())))
348 .set(&song)
349 .execute(&mut self.pool.get().unwrap())?;
350 debug!("Updated song");
351 } else {
352 debug!("Song does not have an ID");
353 }
354 Ok(())
355 }
356
357 #[tracing::instrument(level = "debug", skip(self, conn))]
358 fn get_albums(

Callers 1

test_update_songFunction · 0.45

Calls 4

setMethod · 0.80
cloneMethod · 0.80
getMethod · 0.80
eqMethod · 0.45

Tested by 1

test_update_songFunction · 0.36