Crate wasmcloud_interface_sqldb[][src]

Expand description

This library provides the Rust implementation of the wasmcloud SQL database capability contract wasmcloud:sqldb.

The initial version of this interface supports executing sql queries (inserts, update, create table, etc.) and fetching data (select).

The api is intended to be independent of any specific relational database implementation (postgres, mysql, mariadb, sqlite, etc.).

For efficiency, query results are encoded in Compact Binary Object Representation CBOR, a language-neutral format. CBOR is designed to be an extensible, language-neutral, about 50-70% denser than JSON, and suitable for constrained environments (low cpu and memory requirements). Parsers are simple to write, and libraries are available in several languages.

This interface currently does not support:

  • transactions
  • streaming results
  • prepared statements

Re-exports

pub use minicbor;

Structs

Metadata about a Column in the result set

Result of an Execute operation

Result of a fetch query

Detailed error information from the previous operation

SqlDbSender sends messages to a SqlDb service SqlDb - SQL Database connections To use this capability, the actor must be linked with the capability contract “wasmcloud:sqldb” client for sending SqlDb messages

Constants

Traits

SqlDb - SQL Database connections To use this capability, the actor must be linked with the capability contract “wasmcloud:sqldb” wasmbus.contractId: wasmcloud:sqldb wasmbus.providerReceive

Type Definitions

List of columns in the result set returned by a Fetch operation

A query is a non-empty string containing an SQL query or statement, in the syntax of the back-end database.