Skip to content

[SQLite] REGEXP feature does not work with macros #3070

Description

Bug Description

although the feature flag regexp is enabled, query_as! it doesn't detect it and I get error returned from database: (code: 1) no such function: REGEXP

Minimal Reproduction

pub async fn get_notes(db: SqlitePool) -> Result<Vec<Note>, _> {
    let notes = sqlx::query_as!(
        Note,
        r#"SELECT
              text
             FROM
              notes
             WHERE text REGEXP '(foo|bar)'"#
     )
     .fetch_all(&self.db)
     .await?;
        
    Ok(notes)
}

Info

  • SQLx version: 0.7.3
  • SQLx features enabled: ["runtime-tokio", "sqlite", "json", "regexp"]
  • Database server and version: SQLite 3.42.0
  • Operating system: Gnu/Linux
  • rustc --version: 3.42.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions