@@ -16,10 +16,8 @@ open Microsoft.FSharp.Reflection
1616open System.Collections .Concurrent
1717open System.Runtime .Serialization
1818
19- /// <summary >
2019/// Specifies the database provider type for the SQL type provider.
2120/// Each provider has its own specific implementation for SQL generation and data type mapping.
22- /// </summary >
2321type DatabaseProviderTypes =
2422 /// Microsoft SQL Server using SqlClient provider
2523 | MSSQLSERVER = 0
@@ -46,16 +44,14 @@ type DatabaseProviderTypes =
4644 /// External/custom database provider
4745 | EXTERNAL = 11
4846
49- /// < summary > Specifies the direction for relationship navigation.</ summary >
47+ /// Specifies the direction for relationship navigation.
5048type RelationshipDirection =
5149 /// Navigate to child records (foreign key relationships)
5250 Children = 0
5351 /// Navigate to parent records (primary key relationships)
5452 | Parents = 1
5553
56- /// <summary >
5754/// Specifies how to handle case sensitivity when generating table and column names.
58- /// </summary >
5955type CaseSensitivityChange =
6056 /// Keep original casing from the database
6157 | ORIGINAL = 0
@@ -64,9 +60,7 @@ type CaseSensitivityChange =
6460 /// Convert all names to lowercase
6561 | TOLOWER = 2
6662
67- /// <summary >
6863/// Specifies how to represent nullable database columns in the generated types.
69- /// </summary >
7064type NullableColumnType =
7165 /// Nullable types are just Unchecked default. (Old false.)
7266 | NO_ OPTION = 0
@@ -75,9 +69,7 @@ type NullableColumnType =
7569 /// ValueOption is more performant.
7670 | VALUE_ OPTION = 2
7771
78- /// <summary >
7972/// Specifies the quote character style for ODBC connections when dealing with table and column names containing spaces or special characters.
80- /// </summary >
8173type OdbcQuoteCharacter =
8274 /// Use default quoting for the ODBC driver
8375 | DEFAULT_ QUOTE = 0
@@ -87,15 +79,13 @@ type OdbcQuoteCharacter =
8779 | SQUARE_ BRACKETS = 2
8880 /// Plain, no special names: alias
8981 | NO_ QUOTES = 3 // alias
90- /// Amazon Redshift style: "alias" & Firebird style too
82+ /// Amazon Redshift style: "alias" and Firebird style too
9183 | DOUBLE_ QUOTES = 4
9284 /// Single quote: 'alias'
9385 | APHOSTROPHE = 5
9486
95- /// <summary >
9687/// Specifies which SQLite library to use for connections.
9788/// Different libraries may have different capabilities and platform support.
98- /// </summary >
9989type SQLiteLibrary =
10090 /// .NET Framework default
10191 | SystemDataSQLite = 0
@@ -106,16 +96,12 @@ type SQLiteLibrary =
10696 /// Microsoft.Data.Sqlite. May support .NET Standard 2.0 contract in the future.
10797 | MicrosoftDataSqlite = 3
10898
109- /// <summary >
11099/// Contains events for monitoring SQL query execution and debugging.
111100/// Use these events to log, debug, or analyze the SQL queries generated by the type provider.
112- /// </summary >
113101module public QueryEvents =
114102
115- /// <summary >
116103 /// Contains information about a SQL command being executed, including the command text,
117104 /// parameters, and connection information for debugging and monitoring purposes.
118- /// </summary >
119105 type SqlEventData = {
120106 /// The text of the SQL command being executed.
121107 Command: string
@@ -158,18 +144,9 @@ module public QueryEvents =
158144
159145 let private sqlEvent = Event< SqlEventData>()
160146
161- /// <summary >
162147 /// Event that fires immediately before the execution of every generated query.
163148 /// Listen to this event to display or debug the content of your queries.
164149 /// This is useful for logging, performance monitoring, and debugging SQL generation.
165- /// </summary >
166- /// <example >
167- /// <code >
168- /// QueryEvents.SqlQueryEvent.Add(fun event ->
169- /// printfn "Executing: %s" event.Command
170- /// printfn "Parameters: %A" event.Parameters)
171- /// </code >
172- /// </example >
173150 [<CLIEvent>]
174151 let SqlQueryEvent = sqlEvent.Publish
175152
@@ -206,10 +183,8 @@ module public QueryEvents =
206183 let internal PublishExpression ( e ) = expressionEvent.Trigger( e)
207184
208185[<Struct>]
209- /// <summary >
210186/// Represents the current state of a database entity for change tracking purposes.
211187/// Used internally by the SQL provider to determine what operations need to be performed during SubmitUpdates().
212- /// </summary >
213188type EntityState =
214189 /// Entity has not been modified since it was loaded
215190 | Unchanged
@@ -222,10 +197,8 @@ type EntityState =
222197 /// Entity has been deleted from the database
223198 | Deleted
224199
225- /// <summary >
226200/// Specifies how to handle conflicts when inserting records with duplicate primary keys.
227201/// Currently supported only on databases that have UPSERT capabilities.
228- /// </summary >
229202[<Struct>]
230203type OnConflict =
231204 /// Throws an exception if the primary key already exists (default behaviour).
@@ -237,16 +210,8 @@ type OnConflict =
237210 /// Currently supported only on PostgreSQL 9.5+
238211 | DoNothing
239212
240- /// <summary >
241213/// Attribute for mapping entity properties to database columns with different names.
242214/// Use this when your database column name differs from your preferred F# property name.
243- /// </summary >
244- /// <example >
245- /// <code >
246- /// [ < ; MappedColumn("customer_id")> ; ]
247- /// member x.CustomerId = x.GetColumn< ; int> ; ("customer_id")
248- /// </code >
249- /// </example >
250215type MappedColumnAttribute ( name : string ) =
251216 inherit Attribute()
252217 /// Gets the database column name this property maps to
@@ -569,11 +534,9 @@ type SqlEntity(dc: ISqlDataContext, tableName, columns: ColumnLookup, activeColu
569534 override __.ShouldSerializeValue ( _ ) = false })
570535 |> Seq.cast< PropertyDescriptor> |> Seq.toArray )
571536
572- /// <summary >
573537/// The main interface for SQL data context operations. This interface provides all the core functionality
574538/// for querying, creating, updating, and deleting data through the SQL type provider.
575539/// Users typically access this through the generated GetDataContext() method.
576- /// </summary >
577540and ISqlDataContext =
578541 /// Connection string to database
579542 abstract ConnectionString : string
@@ -616,10 +579,8 @@ and ISqlDataContext =
616579 /// Context meant to be read operations only
617580 abstract IsReadOnly : bool
618581
619- /// <summary >
620582/// Interface implemented by generated types that provide access to the underlying data context.
621583/// This allows access to the ISqlDataContext for advanced operations.
622- /// </summary >
623584type IWithDataContext =
624585 /// Gets the underlying SQL data context
625586 abstract DataContext : ISqlDataContext
0 commit comments