Rust: Add options.yml and sqlx 'query cache' (result of 'sqlx prepare') so that the query test can function.

This commit is contained in:
Geoffrey White
2024-11-18 15:24:33 +00:00
parent 28d0ad94d5
commit 2df565c84f
5 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM people WHERE firstname=$1",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Integer"
},
{
"name": "firstname",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "lastname",
"ordinal": 2,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false
]
},
"hash": "c996a36820ff0b98021fa553b09b6da5ed65c28f666a68c4d73a1918f0eaa6f6"
}

View File

@@ -0,0 +1,5 @@
qltest_cargo_check: true
qltest_dependencies:
- reqwest = { version = "0.12.9", features = ["blocking"] }
- sqlx = { version = "0.8", features = ["mysql", "sqlite", "postgres", "runtime-async-std", "tls-native-tls"] }
- futures = { version = "0.3" }

View File

@@ -22,8 +22,9 @@ use sqlx::Executor;
* sqlx migrate run
* ```
*
* Build and run:
* Build and run with the provided `cargo.toml.manual`:
* ```
* cp cargo.toml.manual cargo.toml
* cargo run
* ```
*