Member Junction
    Preparing search index...

    Function getSchemaPrefix

    • Returns the schema-based prefix for programmatic identifiers (class names, GraphQL types). This is the single source of truth for schema-to-prefix mapping, shared by both TypeScript codegen and SQL (via GetClassNameSchemaPrefix function in the database).

      Special cases:

      • __mj (core MJ schema) → "MJ"
      • MJ (literal schema name) → "MJCustom" (prevents collision with core schema prefix)
      • All others → sanitized schema name via sanitizeGraphQLName

      Parameters

      • schemaName: string

        The SQL schema name

      Returns string

      The clean prefix string to prepend to type/class names

      getSchemaPrefix('__mj')   // "MJ"
      getSchemaPrefix('MJ') // "MJCustom"
      getSchemaPrefix('sales') // "sales"