You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a recursive CTE which I am calling with the query! macro that, simplified, looks like this:
WITH RECURSIVE datetimes(dt) AS (
VALUES('2022-04-29 22:00:00')
UNION ALLSELECT datetime(dt, '-1 hour')
FROM datetimes
WHERE dt > datetime('2022-04-29 22:00:00', '-23 hour')
)
SELECT*FROM datetimes;
I'm getting the following error:
error: attempted to communicate with a crashed background worker
--> /home/michael/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sqlx-0.5.11/src/macros.rs:315:9
|
301 | / macro_rules! query (
302 || // in Rust 1.45 we can now invoke proc macros in expression position
303 || ($query:expr) => ({
304 ||$crate::sqlx_macros::expand_query!(source = $query)
... |
315 ||$crate::sqlx_macros::expand_query!(source = $query, args = [$($args)*])
|| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation (#2)
316 || })
317 || );||__- in this expansion of `sqlx::query!` (#1)|
::: /home/michael/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sqlx-macros-0.5.11/src/lib.rs:28:1
|
28 | pub fn expand_query(input: TokenStream) -> TokenStream {
| ------------------------------------------------------ in this expansion of `$crate::sqlx_macros::expand_query!` (#2)|
::: backend/src/db.rs:542:22
|
542 |let activities = sqlx::query!(
| ______________________-
543 || r#"544 | | WITH RECURSIVE datetimes(dt) AS (545 | | VALUES('2022-04-29 22:00:00')... |552 | | "#,
553 || )
||_____- in this macro invocation (#1)
Copy and pasted directly into DB Browser for SQLite - it works just fine. Is this a limitation in Sqlx or, quite possibly, an oversight of something on my part?
The text was updated successfully, but these errors were encountered:
rustc: 1.60.0
sqlx: 0.5.11
sqlite: 3.36.0
os: ubuntu 20.04
I've got a recursive CTE which I am calling with the
query!
macro that, simplified, looks like this:I'm getting the following error:
Copy and pasted directly into DB Browser for SQLite - it works just fine. Is this a limitation in Sqlx or, quite possibly, an oversight of something on my part?
The text was updated successfully, but these errors were encountered: