Table of Contents

Class SqlServerConnectionCommands

Namespace
ItTiger.TigerQuery.CliCore
Assembly
ItTiger.TigerQuery.CliCore.dll
Composes reusable SQL Server connection-management commands into a TigerCli command group.
public static class SqlServerConnectionCommands
Inheritance
SqlServerConnectionCommands
Inherited Members

Remarks

Host applications supply the shared TigerQueryCliOptions the run selects its store through, register resources, and own final numeric exit-code mapping. The mounted commands return semantic ItTiger.TigerCli.Commands.TigerCliExitKind outcomes such as success, validation error, not found, and already exists.

Methods

Configure(TigerCliCommandGroupBuilder, Action<SqlServerConnectionCommandOptions>?)

Mounts the connection providers and list/show/add/add-e2e-bootstrap/clone-e2e/edit/delete commands.
public static void Configure(TigerCliCommandGroupBuilder group, Action<SqlServerConnectionCommandOptions>? configure = null)

Parameters

group TigerCliCommandGroupBuilder
The TigerCli command group to configure.
configure Action<SqlServerConnectionCommandOptions>
A callback that supplies the shared TigerQuery state and the optional validation policy.

Remarks

Configuration enables prompting for the group, registers saved-connection and live-database providers, and adds the seven command handlers. Add and edit expose repeatable generic metadata mutations; list exposes ordinal, case-sensitive metadata filters combined with AND semantics. Generic mutations reject TigerQuery's reserved namespace, while the add-only E2E switches and bootstrap command use the TigerQuery-owned authorization path.

Edit begins with the existing profile and preserves application-owned metadata unless explicit metadata set/remove options change it. Built-in output and command metadata are localized through the resource manager returned by CreateAppResources(params ResourceManager[]).

The handlers return semantic ItTiger.TigerCli.Commands.TigerCliExitKind values. The host must map those values to its own numeric exit-code policy.

Nothing here reads the store: the handlers, the two providers, and the edit loader all reach it when they run, which is after the contribution callback has selected it. The commands therefore mount identically whether or not the run overrides the path.

Exceptions

ArgumentNullException
group is null.
InvalidOperationException
TigerQuery was not configured, or ValidationPolicy is null.

CreateAppResources(params ResourceManager[])

Builds the ResourceManager a consuming app registers with TigerCli's UseAppResources(...). The app's own managers (if any) are consulted first, so the app can override library strings; the connection-command strings (en-US and pl-PL) act as the fallback for the metadata, enum text, and output owned here.
public static ResourceManager CreateAppResources(params ResourceManager[] appResources)

Parameters

appResources ResourceManager[]
Zero or more host resource managers, in lookup precedence order.

Returns

ResourceManager
A chained manager ending with the connection-command resources.

Exceptions

ArgumentNullException
appResources is null.