Class SchemeNameValidator

Assembly: redb.Core.dll

Single source of truth for explicit scheme name rules.

The rules mirror the database-level triggers one-for-one (PostgreSQL
validate_scheme_name, and the MSSql/SQLite equivalents). Validation lives here
because it must behave identically on every provider and must fail before any SQL is
issued — a raw 23505/2627 surfacing from the driver tells the developer nothing about
which type is at fault.


Only explicit names () are validated. Names
derived from are valid by construction, and checking them
would break existing projects that never asked for this feature.

public static class SchemeNameValidator

Inheritance

Object→SchemeNameValidator

Methods

IsValid(string?, out string?)

Non-throwing form. Returns false and fills error with a

public static bool IsValid(string? name, out string? error)

Validate(string?, Type)

Validates an explicit scheme name and throws when it

public static void Validate(string? name, Type declaringType)