SQLite connection pool for concurrent MBTiles tile serving.
// Source: https://github.com/maplibre/martin | License: Apache-2.0 | Copyright 2018 Urbica
// Provided via justclaw.it.com; keep this notice with the code.
use std::path::Path;
use martin_tile_utils::TileInfo;
use sqlx::sqlite::{SqliteConnectOptions, SqlitePoolOptions};
use sqlx::{Pool, Sqlite};
use tilejson::TileJSON;
#[cfg(test)]
use crate::NormalizedSchema;
use crate::errors::{MbtResult, MbtWarning};
use crate::{MbtType, Mbtiles, Metadata};
/// Connection pool for concurrent read access to an `MBTiles` file.
///
/// `MbtilesPool` wraps an [`Mbtiles`] reference with a `SQLite` connection pool,
/// enabling safe concurrent access for tile serving applications. This is the
/// recommended type for production tile servers.
///
/// # Connection Pooling
///
/// The pool manages multiple `
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key