Expand description
§Omnia WASI SQL
This crate provides the SQL database interface for the Omnia runtime.
§Interface
Implements the wasi:sql WIT interface.
§Backend
- Host: Uses
rusqliteto provide aSQLitebackend. Supports both in-memory (:memory:) and file-based databases.
§Features
§Guest ORM Layer
The guest module provides query builders for type-safe database operations:
- Entity macro: Declare database models with automatic trait implementations.
- Query builders: Fluent APIs for SELECT, INSERT, UPDATE, DELETE.
- Joins & Filters: Type-safe query construction.
§Usage
Add this crate to your Cargo.toml and use it in your runtime configuration:
ⓘ
use omnia::runtime;
use omnia_wasi_sql::SqlDefault;
omnia::runtime!({
"sql": SqlDefault,
});§License
MIT OR Apache-2.0
§WASI SQL Service
This module implements a runtime service for wasi:sql
(https://github.com/aspect-build/wasi-sql).
Modules§
- default_
impl - Default
SQLiteimplementation for wasi-sql
Macros§
- omnia_
wasi_ view - Implementation of the
WasiSqlViewtrait for the store context.
Structs§
- Connection
Proxy ConnectionProxyprovides a concrete wrapper around adyn Connectionobject. It is used to store connection resources in the resource table.- Field
- one field in a row
- Row
- one single row item
- SqlDefault
- Default implementation for
wasi:sql. - Statement
- Represents a statement resource in the WASI SQL host.
- WasiSql
- Host-side service for
wasi:sql. - Wasi
SqlCtx View - View into
WasiSqlCtximplementation andResourceTable.
Enums§
- Data
Type - common data types
Traits§
- Connection
- SQL providers implement the
Connectiontrait to allow the host to connect to a backend (Azure Table Storage, Postgres, etc) and execute SQL statements. - Wasi
SqlCtx - A trait which provides internal WASI SQL context.
- Wasi
SqlView - A trait which provides internal WASI SQL state.
Type Aliases§
- Future
Result - Result type for asynchronous operations.