Skip to content

Commit 1f285a7

Browse files
committed
Add failing test for order+limit issue
1 parent 76ae286 commit 1f285a7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/sqlite/describe.rs

+20
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,23 @@ async fn it_describes_union() -> anyhow::Result<()> {
380380

381381
Ok(())
382382
}
383+
384+
#[sqlx_macros::test]
385+
async fn it_describes_select_with_order_and_limit() -> anyhow::Result<()> {
386+
let mut conn = new::<Sqlite>().await?;
387+
388+
let d = conn
389+
.describe(
390+
r#"
391+
SELECT accounts.name FROM accounts
392+
ORDER BY accounts.name ASC
393+
LIMIT 1
394+
"#,
395+
)
396+
.await?;
397+
398+
assert_eq!(d.column(0).type_info().name(), "TEXT");
399+
assert_eq!(d.nullable(0), Some(false));
400+
401+
Ok(())
402+
}

0 commit comments

Comments
 (0)