mongo/client

Types

pub type Collection {
  Collection(db: Database, name: String)
}

Constructors

  • Collection(db: Database, name: String)
pub opaque type ConnectionInfo
pub type Database {
  Database(socket: tcp.Socket, name: String)
}

Constructors

  • Database(socket: tcp.Socket, name: String)

Functions

pub fn collection(db: Database, name: String) -> Collection
pub fn connect(uri: String) -> Result(Database, Nil)
pub fn execute(collection: Collection, cmd: Value) -> Result(
  List(#(String, Value)),
  #(Int, String),
)