Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2638

How to write a wrapper function for FindOptions in go mongo-driver

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • None
    • None

    Description

      I want to write a wrapper function for FindOptions in my dbobject code so that I can avoid importing package options in my service code . Basically i'm trying to accomodate three func under one interface

      SetSkip() 
      SetLimit()
      SetSort() 

      Also I want to know the usage of MergeFindOptions

      func MergeFindOptions(opts ...*FindOptions) *FindOptions 

      Any examples will be of great help.

      Attachments

        Activity

          People

            matt.dale@mongodb.com Matt Dale
            karthickcseapitam@gmail.com karthick d
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: