Skip to content

Conversation

ahmad-moussawi
Copy link
Contributor

@ahmad-moussawi ahmad-moussawi commented Sep 28, 2025

No behavioral changes

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request applies syntax formatting changes based on the dotnet format tool to standardize code formatting across the C# codebase.

  • Converts traditional namespace declarations to file-scoped namespaces
  • Moves opening braces to the same line for class and method declarations
  • Replaces new List<T>() with collection expressions []
  • Replaces new Dictionary<T>() with collection expressions []

Reviewed Changes

Copilot reviewed 84 out of 85 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
SqlKata.Execution/XQuery.cs Updated namespace declaration and brace formatting
SqlKata.Execution/QueryFactory.cs Updated namespace declaration, brace formatting, and collection initializers
SqlKata.Execution/Query.Extensions.cs Updated namespace declaration and brace formatting
SqlKata.Execution/Properties/AssemblyInfo.cs Removed BOM character
SqlKata.Execution/PaginationResult.cs Updated namespace declaration and brace formatting
SqlKata.Execution/PaginationIterator.cs Updated namespace declaration and brace formatting
SqlKata.Execution/InsertGetId.cs Updated namespace declaration and brace formatting
QueryBuilder/Variable.cs Updated namespace declaration and brace formatting
QueryBuilder/UnsafeLiteral.cs Updated namespace declaration and brace formatting
QueryBuilder/SqlResult.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Query.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Query.Update.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Select.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Join.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Insert.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Having.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Delete.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Combine.cs Updated namespace declaration and brace formatting
QueryBuilder/Query.Aggregate.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Join.cs Updated namespace declaration and brace formatting
QueryBuilder/Include.cs Updated namespace declaration and brace formatting
QueryBuilder/IgnoreAttribute.cs Updated namespace declaration and brace formatting
QueryBuilder/Helper.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Extensions/QueryForExtensions.cs Updated namespace declaration and brace formatting
QueryBuilder/Expressions.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/SqliteCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/SqlServerCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/PostgresCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/OracleCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/MySqlCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/FirebirdCompiler.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/EngineCodes.cs Updated namespace declaration and brace formatting
QueryBuilder/Compilers/CteFinder.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Compilers/ConditionsCompilerProvider.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Compilers/Compiler.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Compilers/Compiler.Conditions.cs Updated namespace declaration and brace formatting
QueryBuilder/ColumnAttribute.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/OrderClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/OffsetClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/LimitClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/JoinClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/InsertClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/IncrementClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/FromClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/ConditionClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/Combine.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/ColumnClause.cs Updated namespace declaration and brace formatting
QueryBuilder/Clauses/AggregateClause.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Clauses/AbstractClause.cs Updated namespace declaration and brace formatting
QueryBuilder/BaseQuery.cs Updated namespace declaration, brace formatting, and collection initializers
QueryBuilder/Base.Where.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/WhereTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/UpdateTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/Sqlite/SqliteLimitTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/SqlServer/SqlServerTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/SqlServer/SqlServerLimitTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/SqlServer/SqlServerLegacyLimitTests.cs Updated namespace declaration and brace formatting
QueryBuilder.Tests/SqlServer/NestedSelectTests.cs Updated namespace declaration and brace formatting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


foreach (var item in dynamicResult) {
var localValue = item[include.LocalKey].ToString();
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : [];
Copy link
Preview

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The empty collection expression [] requires explicit type inference. Consider using new List<Dictionary<string, object>>() for clarity, as the compiler may not be able to infer the correct type in all contexts.

Suggested change
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : [];
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : new List<Dictionary<string, object>>();

Copilot uses AI. Check for mistakes.


foreach (var item in dynamicResult) {
var localValue = item[include.LocalKey].ToString();
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : [];
Copy link
Preview

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The empty collection expression [] requires explicit type inference. Consider using new List<Dictionary<string, object>>() for clarity, as the compiler may not be able to infer the correct type in all contexts.

Suggested change
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : [];
item[include.Name] = children.ContainsKey(localValue) ? children[localValue] : new List<Dictionary<string, object>>();

Copilot uses AI. Check for mistakes.

if (alias != null) {
query.As(alias);
}
;
Copy link
Preview

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semicolon after the closing brace is unnecessary and should be removed.

Suggested change
;

Copilot uses AI. Check for mistakes.

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