Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-694

Query interface for sdk3 seems incomplete

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta.3
    • None
    • None
    • 1
    • SDK1: GA and Priority List

    Description

      As I understand it, the 'SDK3' way to query would be something like:

      cluster.query('SELECT * FROM `default`') # which works fine
      # or
      cluster.query('SELECT * FROM `default` WHERE foo LIKE $email', email='%foo%'). # nope
      # or
      cluster.query('SELECT * FROM `default` WHERE foo LIKE $1', '%foo%') # nope
      

      But the older way, using a N1QLQuery object, works fine:

      cluster.query(N1QLQuery('SELECT * FROM `default` WHERE email LIKE $email', email='%king%'))
      

      A couple questions arise:

      • do we really want to still support a N1QLQuery object?
      • should we support something like the 2 usages above?

      Of course it is entirely possible I'm misunderstanding the code (or the sdk3 RFCs).   

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          david.kelly David Kelly created issue -
          david.kelly David Kelly made changes -
          Field Original Value New Value
          Description As I understand it, the 'SDK3' way to query would be something like:
          {code:python}cluster.query('SELECT * FROM `default`') // which works fine
          # or
          cluster.query('SELECT * FROM `default` WHERE foo LIKE $email', email='%foo%'). // nope
          # or
          cluster.query('SELECT * FROM `default` WHERE foo LIKE $1', '%foo%') // nope
          {code}
          But the older way, using a N1QLQuery object, works fine:
          {code:python}cluster.query(N1QLQuery('SELECT * FROM `default` WHERE email LIKE $email', email='%king%'))
          {code}
          A couple questions arise:
           * do we really want to still support a N1QLQuery object?
           * should we support something like the 2 usages above?

          Of course it is entirely possible I'm misunderstanding the code (or the sdk3 RFCs).   
          As I understand it, the 'SDK3' way to query would be something like:
          {code:python}cluster.query('SELECT * FROM `default`') # which works fine
          # or
          cluster.query('SELECT * FROM `default` WHERE foo LIKE $email', email='%foo%'). # nope
          # or
          cluster.query('SELECT * FROM `default` WHERE foo LIKE $1', '%foo%') # nope
          {code}
          But the older way, using a N1QLQuery object, works fine:
          {code:python}cluster.query(N1QLQuery('SELECT * FROM `default` WHERE email LIKE $email', email='%king%'))
          {code}
          A couple questions arise:
           * do we really want to still support a N1QLQuery object?
           * should we support something like the 2 usages above?

          Of course it is entirely possible I'm misunderstanding the code (or the sdk3 RFCs).   
          Ellis.Breen Ellis Breen made changes -
          Status New [ 10003 ] Open [ 1 ]
          Ellis.Breen Ellis Breen made changes -
          Fix Version/s 3.0.0-beta.3 [ 16328 ]
          Ellis.Breen Ellis Breen made changes -
          Fix Version/s 3.0.0-beta.2 [ 16505 ]
          Fix Version/s 3.0.0-beta.3 [ 16328 ]
          Ellis.Breen Ellis Breen made changes -
          Fix Version/s 3.0.0-beta.3 [ 16328 ]
          Fix Version/s 3.0.0-beta.2 [ 16505 ]
          ingenthr Matt Ingenthron made changes -
          Sprint SDK1: GA and Priority List [ 959 ]
          ingenthr Matt Ingenthron made changes -
          Rank Ranked lower
          ingenthr Matt Ingenthron made changes -
          Rank Ranked higher
          ingenthr Matt Ingenthron made changes -
          Rank Ranked higher
          ingenthr Matt Ingenthron made changes -
          Rank Ranked higher
          david.kelly David Kelly made changes -
          Assignee Ellis Breen [ ellis.breen ] David Kelly [ david.kelly ]
          david.kelly David Kelly made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          david.kelly David Kelly made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          brett19 Brett Lawson made changes -
          Story Points 1
          ingenthr Matt Ingenthron made changes -
          Workflow Couchbase SDK Workflow [ 155225 ] Couchbase SDK Workflow with Review [ 257260 ]

          People

            david.kelly David Kelly
            david.kelly David Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty