Class SqlServerE2eNames
- Namespace
- ItTiger.TigerQuery.Core
- Assembly
- ItTiger.TigerQuery.Core.dll
Creates fixed-prefix, sanitized names for session-scoped E2E resources.
public static class SqlServerE2eNames
- Inheritance
-
SqlServerE2eNames
- Inherited Members
Fields
ConnectionPrefix
The non-overridable saved-connection prefix.
public const string ConnectionPrefix = "E2E-"
Field Value
DatabasePrefix
The non-overridable database prefix.
public const string DatabasePrefix = "_TQ_E2E_"
Field Value
DefaultNamePart
The default part used when no name-part option is supplied.
public const string DefaultNamePart = "session"
Field Value
MemoryOptimizedContainerDirectorySuffix
The directory-name suffix for the memory-optimized data container.
public const string MemoryOptimizedContainerDirectorySuffix = "_MOD_DIR"
Field Value
MemoryOptimizedContainerSuffix
The logical-file suffix for the memory-optimized data container.
public const string MemoryOptimizedContainerSuffix = "_MOD_FILE"
Field Value
MemoryOptimizedFilegroupSuffix
The filegroup suffix for a database provisioned for memory-optimized tables.
public const string MemoryOptimizedFilegroupSuffix = "_MOD_FG"
Field Value
Methods
Connection(string?, string)
Creates a saved-connection name with the protected prefix.
public static string Connection(string? part, string suffix)
Parameters
Returns
Database(string?, string)
Creates a database name with the protected prefix.
public static string Database(string? part, string suffix)
Parameters
Returns
MemoryOptimizedContainer(string)
Names the memory-optimized container's logical file for one exact E2E database.
public static string MemoryOptimizedContainer(string databaseName)
Parameters
databaseNamestring- The exact owned database the container belongs to.
Returns
MemoryOptimizedContainerDirectory(string)
Names the memory-optimized container's directory for one exact E2E database. It is a
single directory name, to be combined with a location SQL Server itself reports.
public static string MemoryOptimizedContainerDirectory(string databaseName)
Parameters
databaseNamestring- The exact owned database the container belongs to.
Returns
Remarks
The name is derived from an already-validated E2E database name, whose grammar admits
only ASCII letters, digits, underscore, and hyphen. It can therefore contain no path
separator, no drive or UNC prefix, no
.. segment, and no quoting-relevant
character, so combining it with a server-reported directory cannot escape that
directory.MemoryOptimizedFilegroup(string)
Names the memory-optimized filegroup belonging to one exact E2E database.
public static string MemoryOptimizedFilegroup(string databaseName)
Parameters
databaseNamestring- The exact owned database the filegroup is added to.
Returns
SanitizePart(string?)
Sanitizes a user name part using the common database/connection grammar.
public static string SanitizePart(string? value)
Parameters
valuestring- The optional source text.
Returns
- string
- Letters, digits, underscore, and hyphen, with other runs replaced by one hyphen.
ValidateDroppableDatabase(string)
Validates a database as an exact protected E2E drop target.
public static void ValidateDroppableDatabase(string databaseName)
Parameters
databaseNamestring