Skip to content

Feature/dapper sql refactor#8

Merged
peterjohncasasola merged 7 commits into
mainfrom
feature/dapper-sql-refactor
Jul 9, 2026
Merged

Feature/dapper sql refactor#8
peterjohncasasola merged 7 commits into
mainfrom
feature/dapper-sql-refactor

Conversation

@peterjohncasasola

Copy link
Copy Markdown
Owner

No description provided.

…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.
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flexquery Error Error Jul 9, 2026 6:49am

@peterjohncasasola peterjohncasasola merged commit 449f9bc into main Jul 9, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant