Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-77345

Move NamespaceString::validDBName to DatabaseName

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • Fully Compatible
    • Service Arch 2023-10-30, Service Arch 2023-11-13

      NamespaceString has a few methods for determining if a database name is valid, some which take a string others which take a DatabaseName. These feel like they belong on the new DatabaseName type (which is concerned with thinking about database names). I propose the following changes:

      • DatabaseName::isValid which can validate an existing DatabaseName is valid, per the rules in NamespaceString::validDbName(DatabaseName)
      • static DatabaseName::isValid(StringData) which replaces NamespaceString::validDbName(StringData)
      • All cases where we call validDBName(DatabaseName::db) (example) be converted to use the new DatbaseName::isValid

            Assignee:
            dominic.hernandez@mongodb.com Dominic Hernandez
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: