Skip to main content

sqlite_vtable_opendal/
lib.rs

1//! # sqlite-vtable-opendal
2//!
3//! Federated SQLite Virtual Tables for Cloud Object Stores using OpenDAL
4//!
5//! This library provides a lightweight way to query metadata from cloud object stores
6//! (Dropbox, S3, etc.) using SQL without ingesting the data. It uses OpenDAL as the
7//! storage abstraction layer and SQLite's virtual table interface.
8//!
9//! ## Features
10//!
11//! - **Metadata-only queries**: Query file metadata without downloading content
12//! - **Multiple backends**: Dropbox, S3, Google Drive, Local FS, and more
13//! - **Standard SQL**: Use familiar SQL syntax for cloud storage queries
14//! - **Pagination support**: Handle large directories efficiently
15//! - **Zero data ingestion**: Query directly from cloud without materialization
16//!
17//! ## Example
18//!
19//! ```rust,ignore
20//! use rusqlite::Connection;
21//!
22//! let conn = Connection::open_in_memory()?;
23//!
24//! // Backend implementations will provide their own registration functions
25//! // For example with Dropbox backend:
26//! // dropbox_vtab::register(&conn)?;
27//!
28//! // Query cloud storage metadata using standard SQL
29//! let mut stmt = conn.prepare("
30//!     SELECT path, size FROM dropbox_files
31//!     WHERE size > 10000000
32//!     ORDER BY size DESC
33//! ")?;
34//! # Ok::<(), rusqlite::Error>(())
35//! ```
36
37pub mod types;
38pub mod error;
39pub mod backends;
40pub mod vtab;
41
42// Re-export commonly used types
43pub use types::{FileMetadata, QueryConfig};
44pub use error::{VTableError, Result};