Feature/dapper sql refactor#8
Merged
Merged
Conversation
…tion from DbConnection Removed the Dialect property from DapperQueryOptions and FlexQueryDapperOptions. Deleted DapperQueryOptionsExtensions.cs (6 Use*() methods). Removed 3 AddFlexQueryDapper*() convenience methods and dialect singleton registration from ServiceCollectionExtensions. DapperQueryExecutor now always resolves dialect via SqlDialectResolver.Resolve(connection). SqlDialectResolver uses EndsWith with Ordinal comparison for accurate type matching, checking more specific providers (Npgsql, Sqlite, Oracle, MariaDb, MySql) before SqlConnection. Unknown connection types throw NotSupportedException instead of falling back to SqlServerDialect.
…d test classes Removed the protected abstract ISqlDialect Dialect property from DapperApiTestBase and its singleton DI registration. Removed Dialect property overrides from 6 test classes: UsersTests, SecurityValidationTests (2 classes), RelationshipTests, OrderAggregationTests, IncludeTests, FlatProjectionTests. Removed ISqlDialect field and constructor injection from DemoApi controllers (3 controllers). Removed Dialect = new SqliteDialect() assignment from ResultCountTests, GroupedQueryExecutionTests, and all 8 occurrences in SecurityGovernanceDapperIntegrationTests.
Covers 7 scenarios: SqlConnection -> SqlServerDialect, NpgsqlConnection -> PostgreSqlDialect, SqliteConnection -> SqliteDialect, MySqlConnection -> MySqlDialect, MariaDbConnection -> MariaDbDialect, OracleConnection -> OracleDialect, and unknown connection type -> NotSupportedException. Uses lightweight mock DbConnection subclasses (no ADO.NET provider packages required).
DapperSqlGenerationBenchmarks: removed _dialect field, inlined new SqlServerDialect() in SqlTranslator constructor call. Sample Program.cs: removed cfg.UseSqlite() call since dialect is now auto-detected from DbConnection.
Removed obsolete Includes alias from FlexQueryBase (use Include instead). Updated FilteredIncludeTests to use Include instead of the removed Includes alias on FlexQueryParameters. Rewrote FlexQueryBaseTests.FlexQueryRequest_IsFlexQueryBase to use the new strongly-typed FlexQueryRequest API (FilterGroup, List<SortNode>, HavingCondition, PagingOptions, ProjectionMode). Removed obsolete IncludesAlias_IsObsolete test.
…exQueryRequest Added FlexQueryRequestExtensions providing fluent builder methods for FlexQueryRequest. FlexQueryRequest is now a standalone sealed class with strongly-typed properties (FilterGroup, List<SortNode>, List<string>, HavingCondition, PagingOptions, ProjectionMode) instead of inheriting from FlexQueryBase.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.