mongo/client

Types

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

Constructors

  • Collection(db: Database, name: String)
pub opaque type Connection
pub opaque type Database

Functions

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