#database-client #sql #mekadb #sql-client

yanked mekadb-client

Hypi's official MekaDB Rust client

4 releases

0.1.4 Jan 31, 2024
0.1.3 Jan 31, 2024
0.1.2 Jan 31, 2024
0.1.1 Jan 30, 2024
0.1.0 Jan 30, 2024

#99 in #database-client

Apache-2.0

39KB
790 lines

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);
  }

Dependencies

~6–8.5MB
~147K SLoC