Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlite and Regexp
Qt 6.11 is out! See what's new in the release blog

QSqlite and Regexp

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udx6bs
    wrote on last edited by
    #1

    Hello,
    I have the following problem when executing the following query with QSqlQueryModel::setQuery() :
    Simplified code:
    @"SELECT id FROM table WHERE REGEXP('1')"@

    When I remove the regexp function everything works just fine.
    Does QT not support REGEXP function with its SQLite driver or am i missing something here?

    My Operating System is Win7 64bit using Qt 5.0.1

    Thx in advance.

    Using Qt5.02/32bit on Windows Win7/64bit

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to DevNet,

      From the "Sqlite doc":http://www.sqlite.org/lang_expr.html#regexp it is said that by default there is no regexp() function implemented. You have to add you own.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        udx6bs
        wrote on last edited by
        #3

        Thank you for the very fast reply.
        My regexp is not that complicated so i can work around it :)

        Using Qt5.02/32bit on Windows Win7/64bit

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved