You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Auto-loaded orientation. `README.md` is for humans.
4
4
5
5
## Identity
6
6
7
-
`SqlServerSimulator`: in-process .NET 10 SQL Server simulation. It's an **ADO.NET stand-in for `Microsoft.Data.SqlClient`** — consumers create a `Simulation`, get a `SimulatedDbConnection` via `CreateDbConnection()`, and use it with (for example) `Microsoft.EntityFrameworkCore.SqlServer` instead of going through SqlClient over the wire. Public surface is intentionally minimal so internals stay free to refactor; `QualityTests.PublicApiWhitelist` is the authoritative list and fails the build on any unintended expansion — resist adding to it.
7
+
`SqlServerSimulator`: in-process .NET 10 SQL Server simulation. It's an **ADO.NET stand-in for `Microsoft.Data.SqlClient`** — consumers create a `Simulation`, get a `SimulatedDbConnection` via `CreateDbConnection()`, and use it with (for example) `Microsoft.EntityFrameworkCore.SqlServer` instead of going through SqlClient over the wire. The full ADO.NET concrete-pipeline chain (`SimulatedDb{Connection,Command,Parameter,ParameterCollection,DataReader,Transaction}` + `SimulatedSqlException` + the info-message family) is public with `new`-shadowed strongly-typed returns, mirroring `Microsoft.Data.SqlClient`'s shape so consumers can downcast and reach concrete properties identically. Public surface beyond that chain is intentionally minimal so internals stay free to refactor; `QualityTests.PublicApiWhitelist` is the authoritative list and fails the build on any unintended expansion — resist adding to it.
8
8
9
9
`SqlServerSimulator.EFCore` is a sibling package whose only public method is `UseSqlServerSimulator(DbContextOptionsBuilder, DbConnection)`. EF Core's SqlServer provider keeps emitting SQL-Server-flavored SQL; the adapter just registers an `IRelationalTypeMappingSourcePlugin` for the (CLR, store) pairs whose default mappings downcast to `SqlParameter` (since the simulator's connection isn't a `SqlConnection`).
[SuppressMessage("Design","CA1032:Implement standard exception constructors",Justification="Only thrown internally; the public-API surface doesn't need standard exception constructors.")]
[SuppressMessage("Design","CA1032:Implement standard exception constructors",Justification="Constructors are private — instances are only built via the topical factory methods on this partial class.")]
/// An error number as described by https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors .
83
+
/// Mirrors <c>SqlException.Number</c>.
72
84
/// </summary>
73
-
publicreadonlyintNumber;
85
+
publicintNumber{get;}
74
86
75
87
/// <summary>
76
88
/// A value from 1 to 25 that indicates the severity level of the error. The default is 0.
89
+
/// Mirrors <c>SqlException.Class</c>.
77
90
/// </summary>
78
91
/// <remarks>
79
92
/// The severity indicates how serious the error is.
80
93
/// Errors that have a low severity, such as 1 or 2, are information messages or low-level warnings.
81
94
/// Errors that have a high severity indicate problems that should be addressed as soon as possible.
82
95
/// </remarks>
83
-
publicreadonlybyteClass;
96
+
publicbyteClass{get;}
84
97
85
98
/// <summary>
86
99
/// Some error messages can be raised at multiple points in the code for the Database Engine.
87
100
/// For example, an 1105 error can be raised for several different conditions.
88
101
/// Each specific condition that raises an error assigns a unique state code.
102
+
/// Mirrors <c>SqlException.State</c>.
89
103
/// </summary>
90
-
publicreadonlybyteState;
104
+
publicbyteState{get;}
105
+
106
+
/// <summary>Collection of one or more <see cref="SimulatedError"/> entries. Mirrors <c>SqlException.Errors</c>.</summary>
107
+
publicSimulatedErrorCollectionErrors{get;}
108
+
109
+
/// <summary>1-based line number of the first error. Shortcut for <c>Errors[0].LineNumber</c>; mirrors <c>SqlException.LineNumber</c>.</summary>
110
+
publicintLineNumber=>this.Errors[0].LineNumber;
111
+
112
+
/// <summary>Name of the procedure or trigger generating the first error, or empty string. Shortcut for <c>Errors[0].Procedure</c>; mirrors <c>SqlException.Procedure</c>.</summary>
113
+
publicstringProcedure=>this.Errors[0].Procedure;
91
114
92
-
publicreadonlySimulatedSqlError[]Errors;
115
+
/// <summary>Server name carried by the first error. Shortcut for <c>Errors[0].Server</c>; mirrors <c>SqlException.Server</c>.</summary>
0 commit comments