feat: remove deprecated connect function and streamline SQLite connection handling

This commit is contained in:
t8y2 2026-05-04 02:57:05 +08:00
parent 12c1a60362
commit fc71be8f1a
1 changed files with 0 additions and 10 deletions

View File

@ -4,16 +4,6 @@ use std::time::{Duration, Instant};
use super::{ColumnInfo, DatabaseInfo, ForeignKeyInfo, IndexInfo, QueryResult, TableInfo, TriggerInfo};
pub async fn connect(url: &str) -> Result<SqlitePool, String> {
SqlitePoolOptions::new()
.max_connections(5)
.acquire_timeout(Duration::from_secs(10))
.idle_timeout(Duration::from_secs(300))
.connect(url)
.await
.map_err(|e| format!("SQLite connection failed: {e}"))
}
pub async fn connect_path(path: &str) -> Result<SqlitePool, String> {
let options = SqliteConnectOptions::new()
.filename(path)