Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-822

Add prefixes to public type names where needed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: None
    • Labels:
      None

      Description

      We prefix a number of our top level types with "Mongo" to disambiguate them and aid in discoverability (e.g. MongoCollection). Some of our types lack this prefix, and we should consider adding them.

      Types that need consideration:

      • ClientSession
      • ClientOptions
      • ChangeStream
      • DatabaseOptions
      • CollectionOptions

      We should also prefix our BSON types with BSON as many of them have potential to clash with names from other libraries. This could lead to breaking the compilation of our users' code when they pull in minor version updates from other libraries they use or make a minor version Swift update as suddenly they would need to prefix all conflicting types with MongoSwift.

      Most of these types are in the BSON library. Let's prefix all of the core BSON types there with BSON

      Non-BSON types we should also probably prefix:

      • Hint
      • Address
      • WriteModel? maybe should be BulkWriteModel?

        Attachments

          Activity

            People

            Assignee:
            kaitlin.mahar Kaitlin Mahar
            Reporter:
            patrick.freed Patrick Freed
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: