pub async fn get_meta_value(pool: &Pool<MySql>, key: &str) -> Result<String>
Expand description
Retrieves a metadata value by its key.
This function performs a simple lookup in the metadata table to retrieve the value associated with the provided key.
§Arguments
pool
- Database connection pool for executing the querykey
- The unique key whose value to retrieve
§Returns
Ok(String)
- Successfully retrieved the value for the keyErr(anyhow::Error)
- Failed to fetch the value or key doesn’t exist
§Error Handling
Returns an error if the key doesn’t exist in the metadata table or if a database error occurs during the query execution.
§Concurrency
This function doesn’t acquire the metadata mutex since it only performs a read operation, which doesn’t risk data corruption.