From b5b7e52b4992b253acc0c5c931be069d5a66028c Mon Sep 17 00:00:00 2001 From: Jake Low Date: Sat, 13 Sep 2025 22:05:28 -0700 Subject: [PATCH 1/3] feat(mbtiles): add pack and unpack subcommands --- Cargo.lock | 2 + mbtiles/Cargo.toml | 4 +- mbtiles/src/bin/mbtiles.rs | 267 ++++++++++++++++++++++++++++++++++++- 3 files changed, 270 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 985608b1e..4a5502a33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3767,6 +3767,7 @@ dependencies = [ "ctor", "enum-display", "env_logger", + "flate2", "flume", "futures", "insta", @@ -3788,6 +3789,7 @@ dependencies = [ "thiserror 2.0.16", "tilejson", "tokio", + "walkdir", "xxhash-rust", ] diff --git a/mbtiles/Cargo.toml b/mbtiles/Cargo.toml index c3b7724cd..760b9bbb5 100644 --- a/mbtiles/Cargo.toml +++ b/mbtiles/Cargo.toml @@ -28,6 +28,7 @@ anyhow = { workspace = true, optional = true } clap = { workspace = true, optional = true } enum-display.workspace = true env_logger = { workspace = true, optional = true } +flate2.workspace = true flume.workspace = true futures.workspace = true itertools.workspace = true @@ -46,8 +47,9 @@ sqlx.workspace = true thiserror.workspace = true tilejson.workspace = true tokio = { workspace = true, features = ["rt-multi-thread"] } -xxhash-rust.workspace = true +walkdir = "2.5.0" +xxhash-rust.workspace = true [dev-dependencies] # For testing, might as well use the same async framework as the Martin itself actix-rt.workspace = true diff --git a/mbtiles/src/bin/mbtiles.rs b/mbtiles/src/bin/mbtiles.rs index 6c0a4c1fe..b27431eeb 100644 --- a/mbtiles/src/bin/mbtiles.rs +++ b/mbtiles/src/bin/mbtiles.rs @@ -1,14 +1,21 @@ +use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use clap::builder::Styles; use clap::builder::styling::AnsiColor; use clap::{Parser, Subcommand}; +use flate2::Compression; +use flate2::read::GzDecoder; +use flate2::write::GzEncoder; +use futures::TryStreamExt; use log::error; use mbtiles::{ - AggHashType, CopyDuplicateMode, CopyType, IntegrityCheckType, MbtResult, MbtTypeCli, Mbtiles, - MbtilesCopier, PatchTypeCli, UpdateZoomType, apply_patch, + AggHashType, CopyDuplicateMode, CopyType, IntegrityCheckType, MbtResult, MbtType, MbtTypeCli, + Mbtiles, MbtilesCopier, PatchTypeCli, UpdateZoomType, apply_patch, create_flat_tables, + create_metadata_table, }; use tilejson::Bounds; +use walkdir::WalkDir; /// Defines the styles used for the CLI help output. const HELP_STYLES: Styles = Styles::styled() @@ -104,6 +111,38 @@ enum Commands { #[arg(long, value_enum)] agg_hash: Option, }, + /// Pack a directory tree of tiles into an MBTiles file + #[command(name = "pack")] + Pack { + /// directory to read + input_directory: PathBuf, + /// MBTiles file to write + output_file: PathBuf, + /// Tile ID scheme for input directory + #[arg(long, value_enum, default_value = "xyz")] + scheme: TileScheme, + }, + /// Unpack an MBTiles file into a directory tree of tiles + #[command(name = "unpack")] + Unpack { + /// MBTiles file to read + input_file: PathBuf, + /// directory to write + output_directory: PathBuf, + /// Tile ID scheme for output directory + #[arg(long, value_enum, default_value = "xyz")] + scheme: TileScheme, + }, +} + +#[derive(Clone, Copy, PartialEq, Debug, clap::ValueEnum)] +enum TileScheme { + /// XYZ (aka. "slippy map") scheme where Y=0 is at the top + #[value(name = "xyz")] + Xyz, + /// TMS scheme where Y=0 is at the bottom + #[value(name = "tms")] + Tms, } #[allow(clippy::doc_markdown)] @@ -300,6 +339,20 @@ async fn main_int() -> anyhow::Result<()> { println!("MBTiles file summary for {mbt}"); println!("{}", mbt.summary(&mut conn).await?); } + Commands::Pack { + input_directory, + output_file, + scheme, + } => { + pack(&input_directory, &output_file, scheme).await?; + } + Commands::Unpack { + input_file, + output_directory, + scheme, + } => { + unpack(&input_file, &output_directory, scheme).await?; + } } Ok(()) @@ -332,6 +385,216 @@ async fn meta_set_value(file: &Path, key: &str, value: Option<&str>) -> MbtResul } } +async fn pack( + input_directory: &Path, + output_file: &Path, + scheme: TileScheme, +) -> anyhow::Result<()> { + if !input_directory.exists() { + anyhow::bail!( + "Input directory does not exist: {}", + input_directory.display() + ); + } + if !input_directory.is_dir() { + anyhow::bail!( + "Input path is not a directory: {}", + input_directory.display() + ); + } + + let mbt = Mbtiles::new(output_file)?; + let mut conn = mbt.open_or_new().await?; + + create_metadata_table(&mut conn).await?; + create_flat_tables(&mut conn).await?; + + let walker = WalkDir::new(input_directory); + let entries = walker.into_iter().filter_entry(|entry| { + let should_include = if entry.file_type().is_dir() { + // skip directories except the root unless they have numeric names + entry.depth() == 0 + || entry + .file_name() + .to_str() + .is_some_and(|s| s.parse::().is_ok()) + } else { + // skip files that do not have a numeric basename + entry + .file_name() + .to_str() + .and_then(|s| s.split('.').next().map(|b| b.parse::().is_ok())) + .unwrap_or(false) + }; + + if !should_include { + log::info!( + "Skipping {}{}", + entry.path().display(), + if entry.file_type().is_dir() { "/" } else { "" } + ); + } + + should_include + }); + + let mut format: Option = None; + let mut compress = false; + + for entry in entries { + let Some(entry) = entry.ok() else { + continue; + }; + + let path_components: Vec<_> = entry.path().iter().skip(1).collect(); + let coords: Vec = path_components + .iter() + .filter_map(|c| { + c.to_str() + .and_then(|s| s.split('.').next()) + .and_then(|basename| basename.parse().ok()) + }) + .collect(); + + if let [z, x, y] = coords.as_slice() { + let (z, x, y) = (u8::try_from(*z)?, *x, *y); + // TODO: set metadata format from extension of first file, and check that + // subsequent files have the same extension + if format.is_none() { + format = match entry.path().extension().and_then(|s| s.to_str()) { + Some("pbf" | "mvt") => Some("pbf".to_string()), + Some("jpg" | "jpeg") => Some("jpg".to_string()), + Some("webp") => Some("webp".to_string()), + Some("png") => Some("png".to_string()), + _ => { + anyhow::bail!("Unsupported file extension: {}", entry.path().display()); + } + }; + + if format == Some("pbf".to_string()) { + compress = true; + } + } + + let data = std::fs::read(entry.path())?; + + let encoded = if compress { + let mut encoder = GzEncoder::new(Vec::new(), Compression::default()); + encoder.write_all(&data)?; + encoder.finish()? + } else { + data + }; + + // Convert from TMS to XYZ if necessary + let y = match scheme { + TileScheme::Xyz => mbtiles::invert_y_value(z, y), + TileScheme::Tms => y, + }; + + mbt.insert_tiles( + &mut conn, + MbtType::Flat, + CopyDuplicateMode::Abort, + &[(z, x, y, encoded)], + ) + .await?; + } + } + + if let Some(format) = format { + mbt.set_metadata_value(&mut conn, "format", format).await?; + } + + // TODO: set minzoom, maxzoom, and bbox? + // either compute them, or possibly read them from {input_directory}/metadata.json + + Ok(()) +} + +async fn unpack( + input_file: &Path, + output_directory: &Path, + scheme: TileScheme, +) -> anyhow::Result<()> { + if !input_file.exists() { + anyhow::bail!("Input file does not exist: {}", input_file.display()); + } + + let mbt = Mbtiles::new(input_file)?; + let mut conn = mbt.open_readonly().await?; + + // Get the format from metadata to determine file extension and compression + let format = mbt.get_metadata_value(&mut conn, "format").await?; + let (extension, decompress) = match format.as_deref() { + Some("pbf") => ("mvt", true), + Some("jpg") => ("jpg", false), + Some("png") => ("png", false), + Some("webp") => ("webp", false), + Some(unknown) => { + anyhow::bail!("Unknown format in MBTiles metadata: {}", unknown); + } + None => anyhow::bail!("No format specified in MBTiles metadata"), + }; + + // Create output directory if it doesn't exist + std::fs::create_dir_all(output_directory)?; + + // Query all tiles from the database + let mut tiles = sqlx::query!("SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles ORDER BY zoom_level, tile_column, tile_row") + .fetch(&mut conn); + + while let Some(tile) = tiles.try_next().await? { + let Some(z) = tile.zoom_level else { + log::warn!("Skipping tile with missing zoom level"); + continue; + }; + let Some(x) = tile.tile_column else { + log::warn!("Skipping tile with missing tile column"); + continue; + }; + let Some(y) = tile.tile_row else { + log::warn!("Skipping tile with missing tile row"); + continue; + }; + let Some(tile_data) = tile.tile_data else { + log::warn!("Skipping tile at {z}/{x}/{y} with missing data"); + continue; + }; + + let z = u8::try_from(z)?; + let x = u32::try_from(x)?; + let y = u32::try_from(y)?; + + // Convert from TMS to XYZ if necessary + let y = match scheme { + TileScheme::Xyz => mbtiles::invert_y_value(z, y), + TileScheme::Tms => y, + }; + + let data = if decompress { + let mut decoder = GzDecoder::new(&tile_data[..]); + let mut decompressed = Vec::new(); + decoder.read_to_end(&mut decompressed)?; + decompressed + } else { + tile_data + }; + + // Create directory structure: output_directory/z/x/ + let tile_dir = output_directory.join(z.to_string()).join(x.to_string()); + std::fs::create_dir_all(&tile_dir)?; + + // Write tile file: output_directory/z/x/y.ext + let tile_file = tile_dir.join(format!("{y}.{extension}")); + std::fs::write(&tile_file, &data)?; + } + + // TODO: write metadata.json file with minzoom, maxzoom, bounds, etc? + + Ok(()) +} + #[cfg(test)] mod tests { use std::path::PathBuf; From 509bca85da829ed138554b91918d6202d66bb2e4 Mon Sep 17 00:00:00 2001 From: Jake Low Date: Tue, 16 Sep 2025 22:45:55 -0700 Subject: [PATCH 2/3] chore(mbtiles): update sqlx query data --- ...a167b406de9961ac3cc69649c6152a6d7a9b7.json | 8 ++-- ...de564de47dde1d588f17e68ec58115ac73a39.json | 10 +++-- ...962954cdd3d913e8a786599da8a3f9799ed4b.json | 10 +++-- ...d23bd852ba445c1058aed380fe83bed618c29.json | 10 +++-- ...bd1c6fb638f84d35457093b5dfbb3c8005433.json | 18 +++++++-- ...05f2a7999788167f41c685af3ca6f5a1359f4.json | 8 ++-- ...6e16068c9897dd25d0ebd32929db9960596b4.json | 8 ++-- ...94f3d7d71f72439c8e8edc5c801f387de364b.json | 12 ++++-- ...ebc59c27dbf204d09a9c1fb0b3bf9aaad284b.json | 12 ++++-- ...8c3a379e96acbdf5fc52d14e29bc726fefab7.json | 10 +++-- ...8098085994c8fba93e0293359afd43079c50c.json | 10 +++-- ...729d96dd1288005f47872c6a79b5bbf1ca8de.json | 10 +++-- ...f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json | 13 +++++-- ...aaca18373bbdd548a8378ae7fbeed351b4b87.json | 10 +++-- ...ba30fbf018805fe9ca2acd2b2e225183d1f13.json | 10 +++-- ...22ea61633c21afb45d3d2b9aeec068d72cce0.json | 10 +++-- ...48a2991e05060e71aa96141ece0867afa2d6c.json | 11 ++++-- ...007c66a1cc45bdfcdc38f93d6ba759125a9aa.json | 8 ++-- ...2cd90903d5401f8f0956245e5163bedd23a4d.json | 11 ++++-- ...907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json | 38 +++++++++++++++++++ ...ad8c695c4c2350f294aefd210eccec603d905.json | 8 ++-- ...6806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json | 13 +++++-- 22 files changed, 174 insertions(+), 84 deletions(-) create mode 100644 mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json diff --git a/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json b/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json index 0672a8d88..3f962a272 100644 --- a/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json +++ b/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", + "query": "VACUUM", "describe": { "columns": [], - "nullable": [], "parameters": { "Right": 0 - } + }, + "nullable": [] }, - "hash": "0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7", - "query": "VACUUM" + "hash": "0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7" } diff --git a/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json b/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json index b57e1a43b..8e6f5e748 100644 --- a/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json +++ b/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT 1 as has_rows FROM sqlite_schema LIMIT 1", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [false], "parameters": { "Right": 0 - } + }, + "nullable": [ + false + ] }, - "hash": "176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39", - "query": "SELECT 1 as has_rows FROM sqlite_schema LIMIT 1" + "hash": "176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39" } diff --git a/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json b/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json index 9036f3e07..7995f68d1 100644 --- a/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json +++ b/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "PRAGMA page_size;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [null], "parameters": { "Right": 0 - } + }, + "nullable": [ + null + ] }, - "hash": "208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b", - "query": "PRAGMA page_size;" + "hash": "208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b" } diff --git a/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json b/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json index 5567bcb49..9e6527331 100644 --- a/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json +++ b/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT value from metadata where name = ?", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Text" } ], - "nullable": [true], "parameters": { "Right": 1 - } + }, + "nullable": [ + true + ] }, - "hash": "386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29", - "query": "SELECT value from metadata where name = ?" + "hash": "386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29" } diff --git a/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json b/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json index 2f8adb024..52857b067 100644 --- a/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json +++ b/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "\n SELECT zoom_level AS zoom,\n count() AS count,\n min(length(tile_data)) AS smallest,\n max(length(tile_data)) AS largest,\n avg(length(tile_data)) AS average,\n min(tile_column) AS min_tile_x,\n min(tile_row) AS min_tile_y,\n max(tile_column) AS max_tile_x,\n max(tile_row) AS max_tile_y\n FROM tiles\n GROUP BY zoom_level", "describe": { "columns": [ { @@ -48,11 +49,20 @@ "type_info": "Integer" } ], - "nullable": [true, false, true, true, true, true, true, true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + false, + true, + true, + true, + true, + true, + true, + true + ] }, - "hash": "41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433", - "query": "\n SELECT zoom_level AS zoom,\n count() AS count,\n min(length(tile_data)) AS smallest,\n max(length(tile_data)) AS largest,\n avg(length(tile_data)) AS average,\n min(tile_column) AS min_tile_x,\n min(tile_row) AS min_tile_y,\n max(tile_column) AS max_tile_x,\n max(tile_row) AS max_tile_y\n FROM tiles\n GROUP BY zoom_level" + "hash": "41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433" } diff --git a/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json b/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json index 6f51727d1..83f5d8a66 100644 --- a/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json +++ b/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", + "query": "PRAGMA encoding = 'UTF-8'", "describe": { "columns": [], - "nullable": [], "parameters": { "Right": 0 - } + }, + "nullable": [] }, - "hash": "428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4", - "query": "PRAGMA encoding = 'UTF-8'" + "hash": "428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4" } diff --git a/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json b/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json index 1d340bb9d..a1e8f8670 100644 --- a/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json +++ b/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", + "query": "DELETE FROM metadata WHERE name=?", "describe": { "columns": [], - "nullable": [], "parameters": { "Right": 1 - } + }, + "nullable": [] }, - "hash": "4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4", - "query": "DELETE FROM metadata WHERE name=?" + "hash": "4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4" } diff --git a/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json b/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json index 798ffd402..cfcc41ad7 100644 --- a/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json +++ b/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT zoom_level, tile_column, tile_row FROM tiles", "describe": { "columns": [ { @@ -18,11 +19,14 @@ "type_info": "Integer" } ], - "nullable": [true, true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + true, + true + ] }, - "hash": "55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b", - "query": "SELECT zoom_level, tile_column, tile_row FROM tiles" + "hash": "55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b" } diff --git a/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json b/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json index 93972cb05..60ca153c9 100644 --- a/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json +++ b/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1", "describe": { "columns": [ { @@ -18,11 +19,14 @@ "type_info": "Blob" } ], - "nullable": [true, true, true], "parameters": { "Right": 1 - } + }, + "nullable": [ + true, + true, + true + ] }, - "hash": "5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b", - "query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1" + "hash": "5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b" } diff --git a/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json b/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json index 502b14763..86d248d90 100644 --- a/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json +++ b/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Blob" } ], - "nullable": [true], "parameters": { "Right": 3 - } + }, + "nullable": [ + true + ] }, - "hash": "60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7", - "query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?" + "hash": "60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7" } diff --git a/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json b/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json index 14afaf063..df630d0b5 100644 --- a/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json +++ b/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT (\n -- Has a 'tiles' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles'\n AND type = 'table'\n --\n ) AND (\n -- 'tiles' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('tiles')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [false], "parameters": { "Right": 0 - } + }, + "nullable": [ + false + ] }, - "hash": "7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c", - "query": "SELECT (\n -- Has a 'tiles' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles'\n AND type = 'table'\n --\n ) AND (\n -- 'tiles' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('tiles')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) as is_valid;" + "hash": "7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c" } diff --git a/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json b/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json index 6beaf80e6..c73c455e9 100644 --- a/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json +++ b/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "PRAGMA page_count;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [null], "parameters": { "Right": 0 - } + }, + "nullable": [ + null + ] }, - "hash": "73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de", - "query": "PRAGMA page_count;" + "hash": "73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de" } diff --git a/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json b/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json index d8b5fb47f..6f43f10c8 100644 --- a/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json +++ b/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1", "describe": { "columns": [ { @@ -23,11 +24,15 @@ "type_info": "Blob" } ], - "nullable": [true, true, true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + true, + true, + true + ] }, - "hash": "748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec", - "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1" + "hash": "748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec" } diff --git a/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json b/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json index 73288ba6e..677e780d8 100644 --- a/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json +++ b/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT (\n -- Has a 'tiles_with_hash' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles_with_hash'\n AND type = 'table'\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [false], "parameters": { "Right": 0 - } + }, + "nullable": [ + false + ] }, - "hash": "77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87", - "query": "SELECT (\n -- Has a 'tiles_with_hash' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles_with_hash'\n AND type = 'table'\n --\n ) as is_valid;" + "hash": "77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87" } diff --git a/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json b/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json index a5d1df10c..e8a351f93 100644 --- a/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json +++ b/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT (\n -- Has a 'map' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'map'\n AND type = 'table'\n --\n ) AND (\n -- 'map' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_id).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('map')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_id' AND type = 'TEXT'))\n --\n ) AND (\n -- Has a 'images' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'images'\n AND type = 'table'\n --\n ) AND (\n -- 'images' table's columns and their types are as expected:\n -- 2 columns (tile_id, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 2\n FROM pragma_table_info('images')\n WHERE ((name = 'tile_id' AND type = 'TEXT')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) AS is_valid;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [false], "parameters": { "Right": 0 - } + }, + "nullable": [ + false + ] }, - "hash": "809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13", - "query": "SELECT (\n -- Has a 'map' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'map'\n AND type = 'table'\n --\n ) AND (\n -- 'map' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_id).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('map')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_id' AND type = 'TEXT'))\n --\n ) AND (\n -- Has a 'images' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'images'\n AND type = 'table'\n --\n ) AND (\n -- 'images' table's columns and their types are as expected:\n -- 2 columns (tile_id, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 2\n FROM pragma_table_info('images')\n WHERE ((name = 'tile_id' AND type = 'TEXT')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) AS is_valid;" + "hash": "809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13" } diff --git a/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json b/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json index 916d56ff6..ab4bd17ba 100644 --- a/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json +++ b/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT (\n -- 'tiles_with_hash' table or view columns and their types are as expected:\n -- 5 columns (zoom_level, tile_column, tile_row, tile_data, tile_hash).\n -- The order is not important\n SELECT COUNT(*) = 5\n FROM pragma_table_info('tiles_with_hash')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB')\n OR (name = 'tile_hash' AND type = 'TEXT'))\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -8,11 +9,12 @@ "type_info": "Integer" } ], - "nullable": [false], "parameters": { "Right": 0 - } + }, + "nullable": [ + false + ] }, - "hash": "85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0", - "query": "SELECT (\n -- 'tiles_with_hash' table or view columns and their types are as expected:\n -- 5 columns (zoom_level, tile_column, tile_row, tile_data, tile_hash).\n -- The order is not important\n SELECT COUNT(*) = 5\n FROM pragma_table_info('tiles_with_hash')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB')\n OR (name = 'tile_hash' AND type = 'TEXT'))\n --\n ) as is_valid;" + "hash": "85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0" } diff --git a/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json b/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json index 54d24ef42..7d5f576d6 100644 --- a/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json +++ b/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "\nSELECT min(zoom_level) AS min_zoom,\n max(zoom_level) AS max_zoom\nFROM tiles;", "describe": { "columns": [ { @@ -13,11 +14,13 @@ "type_info": "Integer" } ], - "nullable": [true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + true + ] }, - "hash": "96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c", - "query": "\nSELECT min(zoom_level) AS min_zoom,\n max(zoom_level) AS max_zoom\nFROM tiles;" + "hash": "96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c" } diff --git a/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json b/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json index 3b6689859..dd6d2f333 100644 --- a/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json +++ b/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", + "query": "INSERT OR REPLACE INTO metadata(name, value) VALUES(?, ?)", "describe": { "columns": [], - "nullable": [], "parameters": { "Right": 2 - } + }, + "nullable": [] }, - "hash": "c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa", - "query": "INSERT OR REPLACE INTO metadata(name, value) VALUES(?, ?)" + "hash": "c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa" } diff --git a/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json b/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json index ab27088d9..591b60836 100644 --- a/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json +++ b/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT name, value FROM metadata WHERE value IS NOT ''", "describe": { "columns": [ { @@ -13,11 +14,13 @@ "type_info": "Text" } ], - "nullable": [true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + true + ] }, - "hash": "d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d", - "query": "SELECT name, value FROM metadata WHERE value IS NOT ''" + "hash": "d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d" } diff --git a/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json b/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json new file mode 100644 index 000000000..99178cb5d --- /dev/null +++ b/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json @@ -0,0 +1,38 @@ +{ + "db_name": "SQLite", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles ORDER BY zoom_level, tile_column, tile_row", + "describe": { + "columns": [ + { + "name": "zoom_level", + "ordinal": 0, + "type_info": "Integer" + }, + { + "name": "tile_column", + "ordinal": 1, + "type_info": "Integer" + }, + { + "name": "tile_row", + "ordinal": 2, + "type_info": "Integer" + }, + { + "name": "tile_data", + "ordinal": 3, + "type_info": "Blob" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + true, + true, + true, + true + ] + }, + "hash": "dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d" +} diff --git a/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json b/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json index fb1d120d3..cdcdb555c 100644 --- a/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json +++ b/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", + "query": "PRAGMA page_size = 512", "describe": { "columns": [], - "nullable": [], "parameters": { "Right": 0 - } + }, + "nullable": [] }, - "hash": "f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905", - "query": "PRAGMA page_size = 512" + "hash": "f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905" } diff --git a/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json b/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json index e6142a1ff..0c3d9aafb 100644 --- a/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json +++ b/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json @@ -1,5 +1,6 @@ { "db_name": "SQLite", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles", "describe": { "columns": [ { @@ -23,11 +24,15 @@ "type_info": "Blob" } ], - "nullable": [true, true, true, true], "parameters": { "Right": 0 - } + }, + "nullable": [ + true, + true, + true, + true + ] }, - "hash": "ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d", - "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles" + "hash": "ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d" } From bac2ef6ab2159bd6b7a4ec6e77bc9fb2c015e5b3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 07:04:42 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ...1a167b406de9961ac3cc69649c6152a6d7a9b7.json | 8 ++++---- ...9de564de47dde1d588f17e68ec58115ac73a39.json | 10 ++++------ ...0962954cdd3d913e8a786599da8a3f9799ed4b.json | 10 ++++------ ...9d23bd852ba445c1058aed380fe83bed618c29.json | 10 ++++------ ...abd1c6fb638f84d35457093b5dfbb3c8005433.json | 18 ++++-------------- ...b05f2a7999788167f41c685af3ca6f5a1359f4.json | 8 ++++---- ...a6e16068c9897dd25d0ebd32929db9960596b4.json | 8 ++++---- ...e94f3d7d71f72439c8e8edc5c801f387de364b.json | 12 ++++-------- ...febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json | 12 ++++-------- ...48c3a379e96acbdf5fc52d14e29bc726fefab7.json | 10 ++++------ ...e8098085994c8fba93e0293359afd43079c50c.json | 10 ++++------ ...3729d96dd1288005f47872c6a79b5bbf1ca8de.json | 10 ++++------ ...2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json | 13 ++++--------- ...3aaca18373bbdd548a8378ae7fbeed351b4b87.json | 10 ++++------ ...3ba30fbf018805fe9ca2acd2b2e225183d1f13.json | 10 ++++------ ...b22ea61633c21afb45d3d2b9aeec068d72cce0.json | 10 ++++------ ...648a2991e05060e71aa96141ece0867afa2d6c.json | 11 ++++------- ...f007c66a1cc45bdfcdc38f93d6ba759125a9aa.json | 8 ++++---- ...b2cd90903d5401f8f0956245e5163bedd23a4d.json | 11 ++++------- ...6907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json | 13 ++++--------- ...4ad8c695c4c2350f294aefd210eccec603d905.json | 8 ++++---- ...86806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json | 13 ++++--------- 22 files changed, 88 insertions(+), 145 deletions(-) diff --git a/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json b/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json index 3f962a272..0672a8d88 100644 --- a/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json +++ b/mbtiles/.sqlx/query-0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", - "query": "VACUUM", "describe": { "columns": [], + "nullable": [], "parameters": { "Right": 0 - }, - "nullable": [] + } }, - "hash": "0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7" + "hash": "0a4540e8c33c71222a68ff5ecc1a167b406de9961ac3cc69649c6152a6d7a9b7", + "query": "VACUUM" } diff --git a/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json b/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json index 8e6f5e748..b57e1a43b 100644 --- a/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json +++ b/mbtiles/.sqlx/query-176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT 1 as has_rows FROM sqlite_schema LIMIT 1", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [false], "parameters": { "Right": 0 - }, - "nullable": [ - false - ] + } }, - "hash": "176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39" + "hash": "176e99c6945b0789119d0d21a99de564de47dde1d588f17e68ec58115ac73a39", + "query": "SELECT 1 as has_rows FROM sqlite_schema LIMIT 1" } diff --git a/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json b/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json index 7995f68d1..9036f3e07 100644 --- a/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json +++ b/mbtiles/.sqlx/query-208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "PRAGMA page_size;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [null], "parameters": { "Right": 0 - }, - "nullable": [ - null - ] + } }, - "hash": "208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b" + "hash": "208681caa7185b4014e7eda4120962954cdd3d913e8a786599da8a3f9799ed4b", + "query": "PRAGMA page_size;" } diff --git a/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json b/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json index 9e6527331..5567bcb49 100644 --- a/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json +++ b/mbtiles/.sqlx/query-386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT value from metadata where name = ?", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Text" } ], + "nullable": [true], "parameters": { "Right": 1 - }, - "nullable": [ - true - ] + } }, - "hash": "386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29" + "hash": "386a375cf65c3e5aef51deffc99d23bd852ba445c1058aed380fe83bed618c29", + "query": "SELECT value from metadata where name = ?" } diff --git a/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json b/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json index 52857b067..2f8adb024 100644 --- a/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json +++ b/mbtiles/.sqlx/query-41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "\n SELECT zoom_level AS zoom,\n count() AS count,\n min(length(tile_data)) AS smallest,\n max(length(tile_data)) AS largest,\n avg(length(tile_data)) AS average,\n min(tile_column) AS min_tile_x,\n min(tile_row) AS min_tile_y,\n max(tile_column) AS max_tile_x,\n max(tile_row) AS max_tile_y\n FROM tiles\n GROUP BY zoom_level", "describe": { "columns": [ { @@ -49,20 +48,11 @@ "type_info": "Integer" } ], + "nullable": [true, false, true, true, true, true, true, true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - false, - true, - true, - true, - true, - true, - true, - true - ] + } }, - "hash": "41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433" + "hash": "41798c456136acb48ce59769a8abd1c6fb638f84d35457093b5dfbb3c8005433", + "query": "\n SELECT zoom_level AS zoom,\n count() AS count,\n min(length(tile_data)) AS smallest,\n max(length(tile_data)) AS largest,\n avg(length(tile_data)) AS average,\n min(tile_column) AS min_tile_x,\n min(tile_row) AS min_tile_y,\n max(tile_column) AS max_tile_x,\n max(tile_row) AS max_tile_y\n FROM tiles\n GROUP BY zoom_level" } diff --git a/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json b/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json index 83f5d8a66..6f51727d1 100644 --- a/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json +++ b/mbtiles/.sqlx/query-428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", - "query": "PRAGMA encoding = 'UTF-8'", "describe": { "columns": [], + "nullable": [], "parameters": { "Right": 0 - }, - "nullable": [] + } }, - "hash": "428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4" + "hash": "428a035a55a07cbb9daac42c3ab05f2a7999788167f41c685af3ca6f5a1359f4", + "query": "PRAGMA encoding = 'UTF-8'" } diff --git a/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json b/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json index a1e8f8670..1d340bb9d 100644 --- a/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json +++ b/mbtiles/.sqlx/query-4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", - "query": "DELETE FROM metadata WHERE name=?", "describe": { "columns": [], + "nullable": [], "parameters": { "Right": 1 - }, - "nullable": [] + } }, - "hash": "4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4" + "hash": "4d952966a8d8a030d2467c0701a6e16068c9897dd25d0ebd32929db9960596b4", + "query": "DELETE FROM metadata WHERE name=?" } diff --git a/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json b/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json index cfcc41ad7..798ffd402 100644 --- a/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json +++ b/mbtiles/.sqlx/query-55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT zoom_level, tile_column, tile_row FROM tiles", "describe": { "columns": [ { @@ -19,14 +18,11 @@ "type_info": "Integer" } ], + "nullable": [true, true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true, - true - ] + } }, - "hash": "55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b" + "hash": "55c64964bfddf842e4dd73726fe94f3d7d71f72439c8e8edc5c801f387de364b", + "query": "SELECT zoom_level, tile_column, tile_row FROM tiles" } diff --git a/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json b/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json index 60ca153c9..93972cb05 100644 --- a/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json +++ b/mbtiles/.sqlx/query-5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1", "describe": { "columns": [ { @@ -19,14 +18,11 @@ "type_info": "Blob" } ], + "nullable": [true, true, true], "parameters": { "Right": 1 - }, - "nullable": [ - true, - true, - true - ] + } }, - "hash": "5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b" + "hash": "5b298df51dccbf0d8a22433a99febc59c27dbf204d09a9c1fb0b3bf9aaad284b", + "query": "SELECT tile_column, tile_row, tile_data FROM tiles WHERE zoom_level = ? LIMIT 1" } diff --git a/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json b/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json index 86d248d90..502b14763 100644 --- a/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json +++ b/mbtiles/.sqlx/query-60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Blob" } ], + "nullable": [true], "parameters": { "Right": 3 - }, - "nullable": [ - true - ] + } }, - "hash": "60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7" + "hash": "60264fa07915878b3f7ba0067f48c3a379e96acbdf5fc52d14e29bc726fefab7", + "query": "SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?" } diff --git a/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json b/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json index df630d0b5..14afaf063 100644 --- a/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json +++ b/mbtiles/.sqlx/query-7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT (\n -- Has a 'tiles' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles'\n AND type = 'table'\n --\n ) AND (\n -- 'tiles' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('tiles')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [false], "parameters": { "Right": 0 - }, - "nullable": [ - false - ] + } }, - "hash": "7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c" + "hash": "7341bfc10beb4719811556a57ae8098085994c8fba93e0293359afd43079c50c", + "query": "SELECT (\n -- Has a 'tiles' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles'\n AND type = 'table'\n --\n ) AND (\n -- 'tiles' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('tiles')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) as is_valid;" } diff --git a/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json b/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json index c73c455e9..6beaf80e6 100644 --- a/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json +++ b/mbtiles/.sqlx/query-73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "PRAGMA page_count;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [null], "parameters": { "Right": 0 - }, - "nullable": [ - null - ] + } }, - "hash": "73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de" + "hash": "73b5d12b379c0fb2d8560d99653729d96dd1288005f47872c6a79b5bbf1ca8de", + "query": "PRAGMA page_count;" } diff --git a/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json b/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json index 6f43f10c8..d8b5fb47f 100644 --- a/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json +++ b/mbtiles/.sqlx/query-748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1", "describe": { "columns": [ { @@ -24,15 +23,11 @@ "type_info": "Blob" } ], + "nullable": [true, true, true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true, - true, - true - ] + } }, - "hash": "748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec" + "hash": "748436831449877b242d6e167a2f8fe1b1e7b6fb87c4e04ad7406a2bbfd35bec", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles WHERE zoom_level >= 0 LIMIT 1" } diff --git a/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json b/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json index 677e780d8..73288ba6e 100644 --- a/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json +++ b/mbtiles/.sqlx/query-77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT (\n -- Has a 'tiles_with_hash' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles_with_hash'\n AND type = 'table'\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [false], "parameters": { "Right": 0 - }, - "nullable": [ - false - ] + } }, - "hash": "77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87" + "hash": "77b2f46851c4e991230ec6a5d33aaca18373bbdd548a8378ae7fbeed351b4b87", + "query": "SELECT (\n -- Has a 'tiles_with_hash' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'tiles_with_hash'\n AND type = 'table'\n --\n ) as is_valid;" } diff --git a/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json b/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json index e8a351f93..a5d1df10c 100644 --- a/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json +++ b/mbtiles/.sqlx/query-809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT (\n -- Has a 'map' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'map'\n AND type = 'table'\n --\n ) AND (\n -- 'map' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_id).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('map')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_id' AND type = 'TEXT'))\n --\n ) AND (\n -- Has a 'images' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'images'\n AND type = 'table'\n --\n ) AND (\n -- 'images' table's columns and their types are as expected:\n -- 2 columns (tile_id, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 2\n FROM pragma_table_info('images')\n WHERE ((name = 'tile_id' AND type = 'TEXT')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) AS is_valid;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [false], "parameters": { "Right": 0 - }, - "nullable": [ - false - ] + } }, - "hash": "809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13" + "hash": "809e89c3b223e28c6716d405e13ba30fbf018805fe9ca2acd2b2e225183d1f13", + "query": "SELECT (\n -- Has a 'map' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'map'\n AND type = 'table'\n --\n ) AND (\n -- 'map' table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_id).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('map')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_id' AND type = 'TEXT'))\n --\n ) AND (\n -- Has a 'images' table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'images'\n AND type = 'table'\n --\n ) AND (\n -- 'images' table's columns and their types are as expected:\n -- 2 columns (tile_id, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 2\n FROM pragma_table_info('images')\n WHERE ((name = 'tile_id' AND type = 'TEXT')\n OR (name = 'tile_data' AND type = 'BLOB'))\n --\n ) AS is_valid;" } diff --git a/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json b/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json index ab4bd17ba..916d56ff6 100644 --- a/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json +++ b/mbtiles/.sqlx/query-85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT (\n -- 'tiles_with_hash' table or view columns and their types are as expected:\n -- 5 columns (zoom_level, tile_column, tile_row, tile_data, tile_hash).\n -- The order is not important\n SELECT COUNT(*) = 5\n FROM pragma_table_info('tiles_with_hash')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB')\n OR (name = 'tile_hash' AND type = 'TEXT'))\n --\n ) as is_valid;", "describe": { "columns": [ { @@ -9,12 +8,11 @@ "type_info": "Integer" } ], + "nullable": [false], "parameters": { "Right": 0 - }, - "nullable": [ - false - ] + } }, - "hash": "85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0" + "hash": "85b46712c445679053e768cc98b22ea61633c21afb45d3d2b9aeec068d72cce0", + "query": "SELECT (\n -- 'tiles_with_hash' table or view columns and their types are as expected:\n -- 5 columns (zoom_level, tile_column, tile_row, tile_data, tile_hash).\n -- The order is not important\n SELECT COUNT(*) = 5\n FROM pragma_table_info('tiles_with_hash')\n WHERE ((name = 'zoom_level' AND type = 'INTEGER')\n OR (name = 'tile_column' AND type = 'INTEGER')\n OR (name = 'tile_row' AND type = 'INTEGER')\n OR (name = 'tile_data' AND type = 'BLOB')\n OR (name = 'tile_hash' AND type = 'TEXT'))\n --\n ) as is_valid;" } diff --git a/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json b/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json index 7d5f576d6..54d24ef42 100644 --- a/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json +++ b/mbtiles/.sqlx/query-96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "\nSELECT min(zoom_level) AS min_zoom,\n max(zoom_level) AS max_zoom\nFROM tiles;", "describe": { "columns": [ { @@ -14,13 +13,11 @@ "type_info": "Integer" } ], + "nullable": [true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true - ] + } }, - "hash": "96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c" + "hash": "96f3201d2151fbef63593c0e87648a2991e05060e71aa96141ece0867afa2d6c", + "query": "\nSELECT min(zoom_level) AS min_zoom,\n max(zoom_level) AS max_zoom\nFROM tiles;" } diff --git a/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json b/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json index dd6d2f333..3b6689859 100644 --- a/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json +++ b/mbtiles/.sqlx/query-c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", - "query": "INSERT OR REPLACE INTO metadata(name, value) VALUES(?, ?)", "describe": { "columns": [], + "nullable": [], "parameters": { "Right": 2 - }, - "nullable": [] + } }, - "hash": "c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa" + "hash": "c8ef3dc53f1f6fd80e266aab2bf007c66a1cc45bdfcdc38f93d6ba759125a9aa", + "query": "INSERT OR REPLACE INTO metadata(name, value) VALUES(?, ?)" } diff --git a/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json b/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json index 591b60836..ab27088d9 100644 --- a/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json +++ b/mbtiles/.sqlx/query-d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT name, value FROM metadata WHERE value IS NOT ''", "describe": { "columns": [ { @@ -14,13 +13,11 @@ "type_info": "Text" } ], + "nullable": [true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true - ] + } }, - "hash": "d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d" + "hash": "d6ac76a234c97d0dc1fc4331d8b2cd90903d5401f8f0956245e5163bedd23a4d", + "query": "SELECT name, value FROM metadata WHERE value IS NOT ''" } diff --git a/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json b/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json index 99178cb5d..2ba11563b 100644 --- a/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json +++ b/mbtiles/.sqlx/query-dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles ORDER BY zoom_level, tile_column, tile_row", "describe": { "columns": [ { @@ -24,15 +23,11 @@ "type_info": "Blob" } ], + "nullable": [true, true, true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true, - true, - true - ] + } }, - "hash": "dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d" + "hash": "dac3fabe6692bff37a212dda506907b573345fc9ec61e2cc6f1cd936ef9a5a8d", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles ORDER BY zoom_level, tile_column, tile_row" } diff --git a/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json b/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json index cdcdb555c..fb1d120d3 100644 --- a/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json +++ b/mbtiles/.sqlx/query-f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905.json @@ -1,12 +1,12 @@ { "db_name": "SQLite", - "query": "PRAGMA page_size = 512", "describe": { "columns": [], + "nullable": [], "parameters": { "Right": 0 - }, - "nullable": [] + } }, - "hash": "f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905" + "hash": "f547ff198e3bb604550a3f191e4ad8c695c4c2350f294aefd210eccec603d905", + "query": "PRAGMA page_size = 512" } diff --git a/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json b/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json index 0c3d9aafb..e6142a1ff 100644 --- a/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json +++ b/mbtiles/.sqlx/query-ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d.json @@ -1,6 +1,5 @@ { "db_name": "SQLite", - "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles", "describe": { "columns": [ { @@ -24,15 +23,11 @@ "type_info": "Blob" } ], + "nullable": [true, true, true, true], "parameters": { "Right": 0 - }, - "nullable": [ - true, - true, - true, - true - ] + } }, - "hash": "ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d" + "hash": "ffec5a4c88b2f5dbe9a2d1937286806bdd2b6a59a26ee0bbcc9a3d3f20efa39d", + "query": "SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles" }