Releases: JordanMarr/SqlHydra
Releases · JordanMarr/SqlHydra
v2.4.0-beta.1 experimental features
SqlHydra.Cli
- Added new "mutable_properties" option to toml "general" section which makes all record properties mutable. 🙀 (defaults to false, of course 😉). This is for in-memory apps that want to bind to generated types directly for edits.
- Postgres now generates materialized views (requires net8 and npgsql v8 or greater). #84
- All providers will now ignore any tables / views with no columns (just in case)
SqlHydra.Query
- Added an experimental
Diff
utility to assist with saving batch changes. #83 - Exposed
KataQuery
property on all queries (the resulting type of query builders) to make it possible to manipulate the underlying SqlKata query for inserts, updates and selects before executing the query.
SqlHydra v2.3.0
Adds support for .NET 8
NOTE: Npgsql v8.0.0 fails when inserting an enum, so use Npgsql v7.0.0 for now.
v2.2.1 - SqlHydra.Query
- Fixes: #71 - selected columns of left joined tables can now be marked as optional by wrapping them with
Some
. - In addition to
isNullValue
andisNotNullValue
functions, added support for the built-inisNull
function
v2.2.0
SqlHydra.Cli
- SQL Server - All table properties now have a generated parameter type attribute
- Npgsql - All table properties now have a generated parameter type attribute
SqlHydra.Query
- Fixed bug #68 where
QueryContext
Logger
was sometimes not showing the final query (for inserts with manually modified query) - Improved
Logger
output so that query shows parameter names and parameter values are listed below query - Improved
Logger
output so that query parameters show their generated column/parameter type
v2.1.0
SqlHydra.Cli
- The TOML configuration
[filters]
section now has a newrestrictions
setting that allows passing restrictions (filters) toGetSchema
. This gives you the ability to pre-filter the queried schema. For example, you can pre-filter to only pull tables in a certain schema. (These filters are not as configurable as the existinginclude
andexclude
glob patterns, but they have been added to help pre-filter extremely large databases to reduce generation times. Unless you are experiencing performance issues, you should use the globinclude
andexclude
post-filters instead.)
See TOML configuration docs here: https://github.com/JordanMarr/SqlHydra/wiki/TOML-Configuration#schema-restrictions - TOML configuration glob filters are now applied to filter tables before columns are collected / processed for each table. This is a small efficiency change.
SqlHydra.Query
- Boolean unary expressions are now supported (without having to explicitly assign
= true
or= false
)
✅ This is now valid and doesn't require an extra parameter!
select {
for o in Sales.SalesOrderHeader do
where o.OnlineOrderFlag
}
✅ This is now valid and doesn't require an extra parameter!
select {
for o in Sales.SalesOrderHeader do
where (not o.OnlineOrderFlag)
}
SqlHydra.Query v2.0.2
Adds the kata
custom operation to the select
computation expression.
This provides direct access to the underlying SqlKata.Query
object within your query.
let getCustomers filters =
select {
for c in main.Customer do
where (c.FirstName = "John")
kata (fun query ->
match filters.LastName with
| Some lastName -> query.Where("c.LastName", lastName)
| None -> query
)
kata (fun query ->
query.OrderBy(filters.SortColumns)
)
}
SqlHydra.Cli v2.0.2 - Maintenance Release
#58 Now sets SQL Server DateOnly
and TimeOnly
parameter types to DbType.Date
and DbType.Time
to improve query performance.
SqlHydra.Cli v2.0.1 - Maintenance Release
- Bug fix #57
- Consolidates generated ColumnReader methods
v2.0.0 - SqlHydra.Cli
New in v2.0
- All generator tools have been consolidated into
SqlHydra.Cli
.- Note that this changes command line syntax from
dotnet sqlhydra-npgsql
todotnet sqlhydra npgsql
- Note that this changes command line syntax from
SqlHydra.SqlServer
,SqlHydra.Npgsql
,SqlHydra.Sqlite
andSqlHydra.Oracle
tools have been deprecated on NuGet.- Support for net5.0 has been dropped (use the legacy tools if you still need it).
SqlHydra.Query
has been updated to v2.0 to maintain parity withSqlHydra.Cli
.