-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release/0.9.1 #307
Merged
Merged
Release/0.9.1 #307
Conversation
This file contains 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
Improved build pipeline, now includes publishing of merged code coverage reports.
The implementation of filters was not correct. When an element is composed as a filter (i.e. "element1 < element2"), the result should be a FilterExpression, not a FilterExpressionSet. FilterExpressionSet used the same composition of elements as FilterExpression, having a LeftArg and RightArg. But a FilterExpresionSet should hold any number N of expressions, not constrained to LeftArg and RightArg. This work was to correct these mis-alignments: - changed FilterExpressionSet to contain a list of FilterExpression/FilterExpressionSet instead of a LeftArg and RightArg, enabling chaining multiple elements that have the same conditional operator - changed implicit operators for filters to return FilterExpression instead of FilterExpressionSet - changed In expressions to return FilterExpression instead of FilterExpressionSet - implementation of FilterExpressionSetAppender was greatly simplified - removed implicit operators as they are now handled correctly via constructors and other methods - FilterExpression -> FilterExpressionSet - FilterExpression -> HavingExpression Additional: - deprecated unused classes: - JoinOnExpressionSet - JoinOnExpressionSetAppender - corrected IsNull function to allow for null and empty strings at termination instead of throwing ArgumentException
…f supplied in dbex.config.json (#304)
…anging ArithmeticExpression to contain a list of args instead of a "LeftArg" and "RightArg" (#305) - Elements used in arithmetic with another ArithmeticExpression are appended to the ArithmeticExpression's list if the arithmetic operator is the same - When composing ArithmeticExpression's with a FieldExpression, the FieldExpression is not provided to the constructed LiteralExpression, ensuring the type of the value is used to construct db parameters (this also fixes a discovered issue in doing arithmetic with a FieldExpression of one type and a value type that differs)
- Deprecated unused StringExtensions. - Deprecated JoinOnExpressionAppender as it wasn't used - Fixed issue with stored procedure execution where selecting a single object had a list return type - Deprecated JoinOnExpressionSetAppender as it had no usage - Deprecated SyncPipeline as it had no usage. - Fixed issue with 2005-2012 appenders for windowed/cte results. - Deprecated base "Cast" and "NullableCast" as they are not used. - Fixed issue with SysDateTimeOffset that was incorrectly typed as DateTime instead of DateTimeOffset - Added code coverage ignore attribute to generated files
- Query Expressions - Added a new SelectSetQueryExpression (derives from QueryExpression), which enables composing queries with multiple queries joined as a single statement - Added support for Union and Union All operations - DOES NOT support multiple return types/mappings, uses the select expression set from the first select query expression to determine how to match ALL returned data - Removed BaseEntity from base QueryExpression in favor of more relevant properties on each derived QueryExpressionType: - InsertQueryExpression: BaseEntity -> Into - DeleteQueryExpression: BaseEntity -> From - UpdatQueryExpression: BaseEntity -> From - SelectQueryExpression: BaseEntity -> From - Reworked AssemblyContext to fully manage properties that were originally pass-thru/delegated to database configuration. This enables changes to be made to AssemblyContext as a query expression is assembled into a statement without changing global state of database configuration. - Added additional generic constraint to query expression builders that identifies the database the builder is building a statement for. - Improved query output formatting, specifically eliminating line break prior to appending a statement termination character. - Added AliasedElement to abstract AliasExpression - Renamed some API elements to align better with MS documentation and its use - AnyOrderByClause -> AnyOrderByExpression - AnyGroupByClause -> AnyGroupByExpression - AnyHavingClause -> AnyHavingExpression - AnyWhereClause -> AnyWhereExpression - AnyJoinOnClause -> AnyJoinOnExpression - For select queries, created a FromExpression to hold any valid From clause, specifically a subquery - Removed requirement that the From clause for selecting entities had to be the table managing the entity, now any table and/or subquery can be used in the From clause when selecting entities - Deprecated: - NullableObjectFieldExpression - NullableObjectFieldExpression<T> - NullableObjectSelectExpression<T> - NullableObjectElement<T> (ObjectElement<T> meets requirements in both nullable and non-nullable contexts) - RawExpression - RawExpressionAppender
…uilds sql parameters. (#311)
* General cleanup * removed unused dependencies in classes * cleaned up build warnings * package upgrades * change log notes * moved extension methods to correct namespaces and added additional extension methods related to QueryExpression types * Added value conversion for char data type
…ression into release/0.9.1
gwgrubbs
added a commit
that referenced
this pull request
Jun 10, 2022
- Benchmark reports - Code coverage reports - AliasedElement to abstract AliasExpression - NullExpression and NullElement interface for handling of null values (instead of DBNull.Value) - FilterExpressions- The implementation of filters was not correct. When an element is composed as a filter (i.e. "element1 < element2"), the result should be a FilterExpression, not a FilterExpressionSet. FilterExpressionSet used the same composition of elements as FilterExpression, having a LeftArg and RightArg. But a FilterExpresionSet should hold any number N of expressions, not constrained to LeftArg and RightArg. This work was to correct these mis-alignments: - Changed FilterExpressionSet to contain a list of FilterExpression/FilterExpressionSet instead of a LeftArg and RightArg, enabling chaining multiple elements that have the same conditional operator - Changed implicit operators for filters to return FilterExpression instead of FilterExpressionSet - Changed In expressions to return FilterExpression instead of FilterExpressionSet - Implementation of FilterExpressionSetAppender was greatly simplified - Removed implicit operators as they are now handled correctly via constructors and other methods - FilterExpression -> FilterExpressionSet - FilterExpression -> HavingExpression - Arithmetic Expressions - Reduced number of appended parenthesis by changing ArithmeticExpression to contain a list of args instead of a "LeftArg" and "RightArg" - Elements used in arithmetic with another ArithmeticExpression are appended to the ArithmeticExpression's list if the arithmetic operator is the same - When composing ArithmeticExpression's with a FieldExpression, the FieldExpression is not provided to the constructed LiteralExpression, ensuring the type of the value is used to construct db parameters (this also fixes a discovered issue in doing arithmetic with a FieldExpression of one type and a value type that differs) - Query Expressions - Added a new SelectSetQueryExpression (derives from QueryExpression), which enables composing queries with multiple queries joined as a single statement - Added support for Union and Union All operations - DOES NOT support multiple return types/mappings, uses the select expression set from the first select query expression to determine how to match ALL returned data - Removed BaseEntity from base QueryExpression in favor of more relevant properties on each derived QueryExpressionType: - InsertQueryExpression: BaseEntity -> Into - DeleteQueryExpression: BaseEntity -> From - UpdatQueryExpression: BaseEntity -> From - SelectQueryExpression: BaseEntity -> From - Reworked AssemblyContext to fully manage properties that were originally pass-thru/delegated to database configuration. This enables changes to be made to AssemblyContext as a query expression is assembled into a statement without changing global state of database configuration. - Removed generic version of NullableObjectElement and ObjectElement, the generic constraint of object/object? provided no value. - Added additional generic constraint to query expression builders that identifies the database the builder is building a statement for. - Corrected IsNull function to allow for null and empty strings at termination instead of throwing ArgumentException. - Improved query output formatting, specifically eliminating line break prior to appending a statement termination character. - Deprecated unused classes: - JoinOnExpressionSet - JoinOnExpressionSetAppender - RawExpression - RawExpressionAppender - Deprecated: - NullableObjectElement<T> (ObjectElement<T> meets requirements in both nullable and non-nullable contexts) - NullableObjectFieldExpression and NullableObjectFieldExpression<T> - NullableObjectSelectExpression<T> - Renamed some API elements to align better with MS documentation and its use - AnyOrderByClause -> AnyOrderByExpression - AnyGroupByClause -> AnyGroupByExpression - AnyHavingClause -> AnyHavingExpression - AnyWhereClause -> AnyWhereExpression - AnyJoinOnClause -> AnyJoinOnExpression - Decoupled value conversion from sql parameter building. Previously, to convert a value before being sent to the database, it could only be done through building a sql parameter - even if the parameter itself wasn't needed. - #304: type overrides were not applied in generated code if supplied in dbex.config.json - Deprecated use of "DBNull.Value". All code should be migrated to use the new expression from use of "dbex.Null"
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.