Table of Contents

Class SqlServerE2eMetadata

Namespace
ItTiger.TigerQuery.Core
Assembly
ItTiger.TigerQuery.Core.dll
The reserved connection-profile metadata TigerQuery uses to authorize end-to-end test infrastructure, and the exact grammar its values must follow.
public static class SqlServerE2eMetadata
Inheritance
SqlServerE2eMetadata
Inherited Members

Remarks

The governing rule is that reachability is not authorization. A profile becomes usable for E2E work only because someone deliberately wrote Enabled=true into it. A valid, connectable, perfectly ordinary development profile is never eligible, whatever it is called and wherever it sits in the store.

General E2E authorization is not bootstrap authorization. A bootstrap profile must be selected by the caller's or host's expected name and must also carry Bootstrap=true. Neither the name nor the metadata is sufficient on its own — see SqlServerE2eConnectionResolver.

Profile metadata is compared ordinally and case-sensitively, so the grammar is exact: keys are matched as written here, lower-case, and Boolean values are the literal True and False. ITTIGER.E2E.ENABLED, True, 1, yes, and  true  are not accepted spellings — nothing is trimmed, lower-cased, or interpreted.

The ReservedKeyPrefix namespace belongs to TigerQuery. Applications must keep their own metadata under their own prefix; a key TigerQuery does not define today may gain a meaning in a later release. Keys under the prefix that this version does not recognize are ignored during resolution, so a store written by a newer TigerQuery still loads.

Fields

AllowDatabaseCreation

ittiger.e2e.allow-database-create — E2E workflows may create databases through this profile. Checked only when a caller asks for that permission, and never implied by Enabled.
public const string AllowDatabaseCreation = "ittiger.e2e.allow-database-create"

Field Value

string

AllowDatabaseDrop

Whether the recorded database is owned and may be dropped by E2E cleanup.
public const string AllowDatabaseDrop = "ittiger.e2e.database.allow-drop"

Field Value

string

Bootstrap

ittiger.e2e.bootstrap — the profile is authorized to act as an E2E bootstrap connection. Required, and required to be exactly True, in addition to selecting the profile by its expected name and requiring Enabled.
public const string Bootstrap = "ittiger.e2e.bootstrap"

Field Value

string

DatabaseName

The exact database targeted by a non-bootstrap E2E profile.
public const string DatabaseName = "ittiger.e2e.database.name"

Field Value

string

Enabled

ittiger.e2e.enabled — the profile may be used by TigerQuery E2E infrastructure. Required, and required to be exactly True.
public const string Enabled = "ittiger.e2e.enabled"

Field Value

string

False

The only accepted negative value for a reserved Boolean key.
public const string False = "false"

Field Value

string

ReservedKeyPrefix

The metadata namespace reserved for TigerQuery E2E lifecycle state.
public const string ReservedKeyPrefix = "ittiger.e2e."

Field Value

string

Remarks

Reserved by documentation and by IsReservedKey(string). Generic profile, store-copy, and CLI metadata mutations reject writes to it; TigerQuery-owned operations such as AuthorizeNewProfile(SqlServerConnectionProfile, bool) are its only writers.

SessionId

The session that owns or correlates a non-bootstrap E2E profile.
public const string SessionId = "ittiger.e2e.session-id"

Field Value

string

True

The only accepted affirmative value for a reserved Boolean key.
public const string True = "true"

Field Value

string

Methods

AuthorizeNewBootstrapProfile(SqlServerConnectionProfile, bool)

Adds the canonical TigerQuery E2E and bootstrap authorization metadata to a newly created connection profile.
public static void AuthorizeNewBootstrapProfile(SqlServerConnectionProfile profile, bool allowDatabaseCreation = false)

Parameters

profile SqlServerConnectionProfile
The bootstrap profile being created.
allowDatabaseCreation bool
Whether E2E infrastructure is also authorized to create databases through the profile.

Remarks

This is the TigerQuery-owned bootstrap write path. The profile name identifies the expected profile during resolution; Bootstrap=true authorizes the selected profile to act as the bootstrap. Both are required.

Exceptions

ArgumentNullException
profile is null.

AuthorizeNewProfile(SqlServerConnectionProfile, bool)

Adds the canonical TigerQuery E2E authorization metadata to a newly created connection profile.
public static void AuthorizeNewProfile(SqlServerConnectionProfile profile, bool allowDatabaseCreation = false)

Parameters

profile SqlServerConnectionProfile
The profile being created.
allowDatabaseCreation bool
Whether E2E infrastructure is also authorized to create databases through the profile.

Remarks

This is the TigerQuery-owned write path for the reserved keys. It records authorization only; it does not identify the profile as a bootstrap profile, persist it, or open a SQL connection.

Exceptions

ArgumentNullException
profile is null.

ConfigureSessionProfile(SqlServerConnectionProfile, Guid, string, bool)

Writes the complete protected metadata schema for a session connection.
public static void ConfigureSessionProfile(SqlServerConnectionProfile profile, Guid sessionId, string databaseName, bool allowDatabaseDrop)

Parameters

profile SqlServerConnectionProfile
The new non-bootstrap E2E profile.
sessionId Guid
The non-empty safety-correlation identifier.
databaseName string
The exact database targeted by the profile.
allowDatabaseDrop bool
Whether dedicated E2E cleanup owns the database.

IsReservedKey(string)

Determines whether a metadata key falls in TigerQuery's reserved namespace.
public static bool IsReservedKey(string key)

Parameters

key string
The key to test.

Returns

bool
true when key starts with ReservedKeyPrefix, compared ordinally.

Remarks

The comparison is case-sensitive for the same reason the keys are: metadata lookup is ordinal, so ITTIGER. is a different namespace and TigerQuery neither claims nor reads it.

Exceptions

ArgumentNullException
key is null.

PreserveReservedMetadata(SqlServerConnectionProfile, SqlServerConnectionProfile)

Preserves TigerQuery-owned metadata while rebuilding an existing profile through an ordinary edit path.
public static void PreserveReservedMetadata(SqlServerConnectionProfile source, SqlServerConnectionProfile destination)

Parameters

source SqlServerConnectionProfile
The existing profile.
destination SqlServerConnectionProfile
The replacement profile.

Remarks

Every current or future reserved key is copied verbatim. This supports forward-compatible edits without letting generic metadata mutation APIs set or remove the namespace.

ReadFlag(SqlServerConnectionProfile, string)

Reads one reserved Boolean metadata entry under the strict grammar.
public static SqlServerE2eFlagState ReadFlag(SqlServerConnectionProfile profile, string key)

Parameters

profile SqlServerConnectionProfile
The profile whose metadata is inspected.
key string
The reserved key to read.

Returns

SqlServerE2eFlagState
Absent when the key is not present, True or False for an exact match, and Malformed for anything else — including an empty value and a value that differs only in case or surrounding whitespace.

Remarks

Reading metadata touches no file and opens no connection.

Exceptions

ArgumentNullException
profile is null.
ArgumentException
key is null or empty. The parameter name is key.