- Throw
InvalidOperationException
whenSql.List
,Sql.Tuple
,Sql.ParamList
, orSql.ParamTuple
generate an empty SQL fragment.
- Support new
Sql
methods:And
,Clauses
,GroupBy
,Having
,List
,Or
,OrderBy
,ParamList
,ParamTuple
,Tuple
,Where
. - Support lowercase keywords via
SqlSyntax
.
- Reuse the same parameter when an instance from
Sql.Param
is used more than once.
- Add .NET 6 target. Improve reference nullability.
- Add
OpenConnection
toDbProviderMethods
. This allows the implementation of a more resilient connection opener. - Introduce
DelegatingDbProviderMethods
.
- Use
DisposeAsync
when available.
- Support
DbConnector.ReleaseConnection
.
- Support
Sql.DtoParamNames
andSql.DtoParamNamesWhere
. - Support
DbParameters.FromDtoWhere
andDbParameters.AddDtoWhere
.
- Support
Sql.ColumnNamesWhere
andSql.ColumnParamsWhere
.
- Support
DbConnectorPool
.
- Support
DefaultIsolationLevel
.
Sql.ColumnNames
should support tuples of DTOs.
- Support snake case when generating column names for a DTO.
- Use
Sql.ColumnNames
to format a comma-delimited list of column names for a DTO. - Use
Sql.ColumnParams
to format a comma-delimited list of parameters from a DTO. - Respect
ColumnAttribute
on DTOs when querying or usingSql.ColumnNames
.
connector.CommandFormat($"...")
is shorthand forconnector.Command(Sql.Format($"..."))
.
- Map strings to enumerated types.
- Use
Sql.Concat
oroperator +
to concatenate SQL fragments.
- Use
Sql.Empty
for empty SQL fragments. - Use
Sql.Join
to join SQL fragments. - Use
Sql.LikePrefixParam
to match a prefix withLIKE
. - Use
Sql.Name
to quote identifiers. Use withSqlSyntax.MySql
,SqlSyntax.Sqlite
, etc., for the proper quoting syntax. - Add
SqlSyntax
toDbConnector
andDbConnectorSettings
. - Add
DelegatingDbConnector
andDelegatingSqlSyntax
. - Drop support for format specifiers in formatted SQL. (Minor breaking change.)
- Reuse parameter objects in cached commands to maximize performance and meet the requirements of some ADO.NET providers for prepared commands.
- Bulk insert respects command timeout, caching, and preparing.
- Support attaching a native transaction.
- Prepare commands asynchronously.
Sql.Format
creates parameters via string interpolation.- Support mapping data records to DTOs with read-only properties. (Uses Faithlife.Reflection).
- Create parameters from collections of values or DTOs.
- Customize parameter names when created from DTOs or collections.
- Support stored procedures.
- Support command timeout.
- Support prepared commands.
- Support mapping data records to C# 9 positional records.
- Thanks to tywmick for contributing!
- Support reading a blob as a
Stream
.
- Fix error message on empty collection query parameter.
- Support cached commands.
- Add
BulkInsertAsync
overload.
- Add
BulkInsert
andBulkInsertAsync
extension methods toDbConnectorCommand
. - Add
ToDictionary
toDbParameters
. - Add
Connector
DbConnectorCommand
.
- Add single parameter
DbParameters.Create
likeDbParameters.Add
. - Add special syntax for collection parameters.
- Create/add parameters from sequences of parameter tuples with non-
object
value types. - Create/add parameters from dictionaries.
- Drop
MaybeNull
attribute fromQueryFirstOrDefault
andQuerySingleOrDefault
.
- Official release.
- Try to avoid assembly binding errors from downstream dependencies.
- Breaking: Allow
object
to return a single field as-is instead of building a dynamic object with one property. - Breaking: Make
ProviderMethods
property internal (otherwise it seems important to the API). - Breaking: Use
ValueTask
instead ofTask
. - Breaking: Rename
read
parameter tomap
. - Ignore underscores when mapping fields to DTO properties.
- Support index/range and
IAsyncEnumerable
on .NET Standard 2.0. - Support
IAsyncDisposable
. - Add
Enumerate
toDbConnectorResultSets
. - Support mapping records to dictionaries.
- Add null record fields when mapping to dynamic.
- Breaking: Eliminate
DataRecordUtility
. - Breaking: Rename
DbConnectorResultSet
toDbConnectorResultSets
. - Breaking: Make
DbParameters
an immutablestruct
. - Breaking: Use
count
parameter name consistently. - Breaking: Support nullable reference types. Make some previously nullable parameters and properties non-nullable.
- Add
QueryMultipleAsync
. - Add
EnumerateAsync
, which uses the newIAsyncEnumerable
(.NET Standard 2.1). - Support index/range for data record access (.NET Standard 2.1).
- Expose text and parameters of commands.
- Support new async ADO.NET methods from .NET Standard 2.1.
- Add XML documentation comments.
- Improve NuGet package description and tags.
- Fix bug with QueryFirst/Single and multiple result sets.
- Advance version past internal version.
- Stop using CommandBehavior.SequentialAccess.
- Initial release.