set query limit

This commit is contained in:
OMGeeky
2023-04-12 16:57:17 +02:00
parent ced8bb5cb7
commit a68e80bfce
2 changed files with 16 additions and 0 deletions

View File

@@ -99,6 +99,15 @@ async fn simple_query() {
last_num = line.row_id;
}
}
#[tokio::test]
async fn test_select_limit_1() {
init_logger();
let client = get_test_client().await;
let q = DbInfos::query(&client)
.set_limit(1)
.run().await.unwrap();
assert_eq!(q.len(), 1);
}
fn init_logger() {
let _ = env_logger::builder()