Skip to main content

register

Function register 

Source
pub fn register(
    conn: &Connection,
    module_name: &str,
    endpoint: impl Into<String>,
) -> Result<()>
Expand description

Register the http virtual table with SQLite

This function creates a virtual table module that allows querying HTTP resources using SQL.

§Arguments

  • conn - SQLite connection
  • module_name - Name for the virtual table (e.g., “http_data”)
  • endpoint - Base HTTP endpoint URL

§Example

use rusqlite::Connection;
use sqlite_vtable_opendal::backends::http;

let conn = Connection::open_in_memory()?;
http::register(&conn, "http_data", "https://api.example.com")?;

// Now you can query: SELECT * FROM http_data