PHP Driver
  1. PHP Driver
  2. PHP-389

Support setting query flags (opts)

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0beta1
    • Component/s: None
    • Labels:
    • Backward Breaking:
      No
    • # Replies:
      5
    • Last comment by Customer:
      false

      Description

      You should be able to set any option for the query/cursor as defined in the wire protocol. There should be a generic add/removeOption (maybe flag since option is already used) so you can add things like partial for sharded queries.

        Activity

        Hide
        SlugFiller
        added a comment -

        I know you're busy fixing a segfault for 1.2.11 (which I do hope is resolved soon), but I just want to throw in that this feature is a show-stopper for me. Since the PHP driver, unlike the other drivers, only allows a small subset of the flags, there are certain database features which cannot be used properly (or at all). A good example for this is tailable cursors.

        Show
        SlugFiller
        added a comment - I know you're busy fixing a segfault for 1.2.11 (which I do hope is resolved soon), but I just want to throw in that this feature is a show-stopper for me. Since the PHP driver, unlike the other drivers, only allows a small subset of the flags, there are certain database features which cannot be used properly (or at all). A good example for this is tailable cursors.
        Hide
        Derick Rethans
        added a comment -

        SlugFiller, tailable() is already available: http://docs.php.net/manual/en/mongocursor.tailable.php and I have added awaitData() locally (but not pushed to github yet). I'd also rather add named methods instead of a generic add/removeOption() method. Which other query flags are you missing?

        Show
        Derick Rethans
        added a comment - SlugFiller, tailable() is already available: http://docs.php.net/manual/en/mongocursor.tailable.php and I have added awaitData() locally (but not pushed to github yet). I'd also rather add named methods instead of a generic add/removeOption() method. Which other query flags are you missing?
        Hide
        Scott Hernandez
        added a comment -

        For forward features we should do both, period. This is done on all drivers
        to support arbitrary flags.

        Show
        Scott Hernandez
        added a comment - For forward features we should do both, period. This is done on all drivers to support arbitrary flags.
        Hide
        SlugFiller
        added a comment -

        Sounds like your local version would give me what I need, once it's released.
        But I have to agree with Scott: Named methods are nice as aliases, but they are not forward-safe, and will force you to continually mutate the API to accomplish something that, even in the protocol itself, is designed to be extensible.

        Show
        SlugFiller
        added a comment - Sounds like your local version would give me what I need, once it's released. But I have to agree with Scott: Named methods are nice as aliases, but they are not forward-safe, and will force you to continually mutate the API to accomplish something that, even in the protocol itself, is designed to be extensible.
        Hide
        auto
        added a comment -

        Author:

        {u'date': u'2013-04-11T08:44:58Z', u'name': u'Derick Rethans', u'email': u'github@derickrethans.nl'}

        Message: Fixed PHP-744: Support the oplog_replay query flag.

        No extra test case needed, as the one for PHP-389 already covers it. There is
        also no helper method as this is not something most people should use.
        Branch: master
        https://github.com/mongodb/mongo-php-driver/commit/6b2330f44ddefc29b57bdc2f4f8806fe0f1dded1

        Show
        auto
        added a comment - Author: {u'date': u'2013-04-11T08:44:58Z', u'name': u'Derick Rethans', u'email': u'github@derickrethans.nl'} Message: Fixed PHP-744 : Support the oplog_replay query flag. No extra test case needed, as the one for PHP-389 already covers it. There is also no helper method as this is not something most people should use. Branch: master https://github.com/mongodb/mongo-php-driver/commit/6b2330f44ddefc29b57bdc2f4f8806fe0f1dded1

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 3 days ago
              Date of 1st Reply: