pub fn read_grid_data(conn: &rusqlite::Connection, tile_id: TmsTileId, key: &str) -> rusqlite::Result<Option<String>> {
    let mut select_grid = conn.prepare_cached(
        "SELECT key_json FROM grid_data WHERE zoom_level = ?1 AND tile_column = ?2 AND tile_row = ?3 AND key = ?4",
    )?;
    let mut rows = select_grid.query(params![tile_id.z(), tile_id.x(), tile_id.y(), key])?;

    if let Some(row) = rows.next()? {
        let grid_data: String = row.get(0)?;
        Ok(Some(grid_data))
    } else {
        Ok(None)
    }
}
/// Reads the grid data for the given key from the database.
///
/// If the grid data is not found, `None` is returned.
Reads the grid data for the given key from the database.
If the grid data is not found, `None` is returned.
Reads the grid data for the given key from the database . If the grid data is not found ` None ` is returned .
pub fn read_grid_data(conn: &rusqlite::Connection, tile_id: TmsTileId, key: &str) -> rusqlite::Result<Option<String>> {
    let mut select_grid = conn.prepare_cached(
        "SELECT key_json FROM grid_data WHERE zoom_level = ?1 AND tile_column = ?2 AND tile_row = ?3 AND key = ?4",
    )?;
    let mut rows = select_grid.query(params![tile_id.z(), tile_id.x(), tile_id.y(), key])?;
    if let Some(row) = rows.next()? {
        let grid_data: String = row.get(0)?;
        Ok(Some(grid_data))
    } else {
        Ok(None)
    }
}
pub fn read_grid_data ( conn : & rusqlite :: Connection , tile_id : TmsTileId , key : & str ) -> rusqlite :: Result < Option < String > > { let mut select_grid = conn . prepare_cached ( " " , ) ? ; let mut rows = select_grid . query ( params ! [ tile_id z ( ) tile_id x ( ) tile_id y ( ) key ] ) ? ; if let Some ( row ) = rows . next ( ) ? { let grid_data : String = row . get ( 0 ) ? ; Ok ( Some ( grid_data ) ) } else { Ok ( None ) } }
Reads the grid data for the given key from the database.
Reads the grid data for the given key from the database .
conn
&rusqlite::Connection
tile_id
TmsTileId
key
&str