packages/@greenpandastudios/aug-sqlite/0.2.0/contracts.aug
A database with SQLite · Dependency source and specification
This is the exact dependency version used by this example.
Code
aug
// Generated by aug spec. This is a copy of the installed dependency source.
// aug-spec: "contracts.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Database from bindings
SqliteError(int code, string message) implements Error:
pass
/** Permission to open database files. Select the native adapter in main.aug. */
capability DatabaseStorage:
open(string path) returns own Database uses DatabaseStorage.open unless SqliteErroraug
// Generated by aug spec. This is a copy of the installed dependency source.
// aug-spec: "contracts.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Database from bindings
SqliteError(int code, string message) implements Error {
pass
}
/** Permission to open database files. Select the native adapter in main.aug. */
capability DatabaseStorage {
open(string path) returns own Database uses DatabaseStorage.open unless SqliteError
}Compiled specification
SqliteError · class · source
It implements Error. It takes code as an integer, kept read-only and message as a string, kept read-only.
DatabaseStorage · capability interface · source
Permission to open database files. Select the native adapter in main.aug.
DatabaseStorage.open · source
It takes path as a string. It returns ownership of Database. It can call DatabaseStorage.open. Failures can raise SqliteError.
Dependencies
It uses Database from bindings.