Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-356

Named Prepared Statement Support

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 2.1.0
    • None
    • None
    • Security Level: Public
    • None

    Description

      Add support for prepared statement:

      We will hash the query on the client side to generate the prepared name.
      We will pass in the prepared name, along with a query for preparing the statement.
      If the prepared statement doesn't exist, based on Colm's new change the query we passed along will get executed, and in effect the statement will become prepared on that node. The Query plan will be returned if the prepared statement didn't exist.
      It requires us checking the result set for #operator. If we see that, we know we just prepared a statement, and didn't execute one as when a statement is prepared the query plan comes back.
      If we see the #operator, then we have to retry the same query again, (which will execute on a different node) until we receive the results.
      This means when a statement is initially prepared there will be N (query nodes) + 1 requests before receive the results. Prior to Colm's change this would have been (N*2) +1.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            tgreenstein Todd Greenstein [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty