SqlServerSchemaInspector
SQL Server implementation of schema inspection
public sealed class SqlServerSchemaInspector : ISchemaInspector
Constructors
SqlServerSchemaInspector
public SqlServerSchemaInspector(string connectionString)
Initializes a new instance of the `` class
| Parameter | Type | Description |
|---|---|---|
connectionString |
String |
SQL Server connection string |
Methods
GetTableAsync(string, string)
public Task<DatabaseTable?> GetTableAsync(string schema, string tableName)
Gets table information including columns and their metadata
Parameters:
| Name | Type | Description |
|---|---|---|
schema |
String |
Table schema |
tableName |
String |
Table name |
Returns: DatabaseTable> - Table information or null if not found
GetAllTablesAsync()
public Task<IReadOnlyList<DatabaseTable>> GetAllTablesAsync()
Gets all tables in the database
Returns: DatabaseTable>> - List of all tables
GetSqlQueryMetadataAsync(string)
public Task<Result<SqlQueryMetadata, SqlError>> GetSqlQueryMetadataAsync(string sqlQuery)
Gets metadata about the columns returned by a SQL query
Parameters:
| Name | Type | Description |
|---|---|---|
sqlQuery |
String |
The SQL query to analyze |
Returns: SqlError>> - Result containing metadata about the query result columns