Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11456

support for PreparedStatement with LIKE

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.6
    • Legacy/CQL

    Description

      Using the Java driver for example:

      PreparedStatement pst = session.prepare("select * from test.users where first_name LIKE ?");
      BoundStatement bs = pst.bind("Jon%");
      

      The first line fails with SyntaxError: line 1:47 mismatched input '?' expecting STRING_LITERAL (which makes sense since it's how it's declared in the grammar). Other operators declare the right-hand side value as a Term.Raw, which can also be a bind marker.

      I think users will expect to be able to bind the argument this way.

      Attachments

        Activity

          People

            samt Sam Tunnicliffe
            xedin Pavel Yaskevich
            Sam Tunnicliffe
            Pavel Yaskevich
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: