mekadb

Crates.iomekadb
lib.rsmekadb
version0.1.0
sourcesrc
created_at2024-03-03 17:35:00.349005
updated_at2024-03-03 17:35:00.349005
descriptionHypi's official MekaDB Rust client.
homepagehttps://hypi.ai/mekadb
repositoryhttps://github.com/hypi-universe/
max_upload_size
id1160786
size46,465
Courtney Robinson (zcourts)

documentation

https://hypi.ai/docs/mekadb/how-to-connect

README

MekaDB

Register at https://hypi.ai/mekadb.

Usage

  fn demo(){
    let client = MekaDBClient::connect("https://mekadb.hypi.app".to_owned()).await?;
    let ctx = client.login("<db>".to_owned(), "<username>".to_owned(), "<password>".to_owned(), ).await?;

    let _ = client.query("CREATE TABLE IF NOT EXISTS user(username VARCHAR, pass VARCHAR, PRIMARY KEY (username))".to_owned(),ctx.clone(),None::<Vec<ParamValue>>).await?;
    let _ = client.query("INSERT INTO user(username,pass) VALUES('courtney','pass1'),('damion','pass2')".to_owned(), ctx.clone(), None::<Vec<ParamValue>>, ).await?;
    let rows = client.query("SELECT * FROM user".to_owned(), ctx.clone(), None::<Vec<ParamValue>>,).await?;
    println!("Rows {:?}", rows);
  }
Commit count: 0

cargo fmt