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

Method insert_artist

src-tauri/database/src/database.rs:117–129  ·  view source on GitHub ↗
(
        &self,
        conn: &mut PooledConnection<ConnectionManager<LoggingConnection<SqliteConnection>>>,
        _artist: &mut QueryableArtist,
    )

Source from the content-addressed store, hash-verified

115
116 #[tracing::instrument(level = "debug", skip(self, conn))]
117 fn insert_artist(
118 &self,
119 conn: &mut PooledConnection<ConnectionManager<LoggingConnection<SqliteConnection>>>,
120 _artist: &mut QueryableArtist,
121 ) -> Result<String> {
122 _artist.artist_id = Some(Uuid::new_v4().to_string());
123 trace!("Inserting artist");
124 insert_into(artists)
125 .values(_artist as &QueryableArtist)
126 .execute(conn)?;
127 info!("Inserted artist");
128 Ok(_artist.artist_id.as_ref().unwrap().clone())
129 }
130
131 #[tracing::instrument(level = "debug", skip(self, conn))]
132 fn insert_genre(

Callers 1

insert_songs_by_refMethod · 0.80

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected