spin-sdk 5.2.0

The Spin Rust SDK makes it easy to build Spin components in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
interface postgres {
  use rdbms-types.{parameter-value, row-set, error};

  /// A connection to a postgres database.
  resource connection {
    /// Open a connection to the Postgres instance at `address`.
    open: static func(address: string) -> result<connection, error>;

    /// Query the database.
    query: func(statement: string, params: list<parameter-value>) -> result<row-set, error>;

    /// Execute command to the database.
    execute: func(statement: string, params: list<parameter-value>) -> result<u64, error>;
  }
}