python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Generic query function
Im not sure if what im asking for here is even possible in Rust but ill give it an ask anyway. So thanks to some helpful people on here I am able to use the sqlx::query_as! macro to query data from a ...
discodowney
Votes: 0
Answers: 0
getting row data from sql::query_as
Im trying to use sqlx to get data from a mysql db. I have the following:
#[derive(Debug, PartialEq, Eq, sqlx::FromRow)]
struct Room {
name: String
}
let mut stream = sqlx::query_a...
discodowney
Votes: 0
Answers: 1
Select query returns no data
I have the following code:
use sqlx::mysql::*;
mod db;
#[tokio::main]
async fn main() -> Result<(), sqlx::Error> {
println!("Hello, world!");
let pool = MySqlPoolOptions:...
discodowney
Votes: 0
Answers: 1
How to test two parallel transactions in Rust SQLx?
I'm experimenting with Rocket, Rust and SQLx and I'd like to test what happens when two parallel transactions try to insert a duplicated record on my table.
My insert fn contains nothing special and i...
André
Votes: 0
Answers: 2