v2.4.0
SqlHydra.Cli
-
Rewrote code generation using Fabulous.AST!
-
Added new
mutable_properties
option to toml which makes all record properties mutable. 🙀 (defaults to false.) -
Added new
nullable_property_type
option to toml which allows nullable columns to be generated as either F#option
types (default) orSystem.Nullable
properties. The latter can be useful for C# interop or CRUD scenarios where you want to data bind generated types directly to UI controls. (Generally, I would recommend mapping generated types to domain entities or DTOs, but it's nice to have the option to do things in a quick and dirty way.)mutable_properties = true
nullable_property_type = "Nullable"
-
Improved CLI Output
- The entire TOML configuration is now printed to CLI
- TOM include/exclude filters are now printed to CLI, along with the number of tables generated (post-filter) and the total number of tables found (pre-filter) to the console. #88
-
All providers will now ignore any tables / views with no columns (just in case)
-
Postgres
"time with time zone"
columns now generate DateTimeOffset properties -
Postgres now generates materialized views (requires net8 and npgsql v8 or greater). #84
-
Updated CLI to latest
"Microsoft.Data.SqlClient"
to fix warnings
SqlHydra.Query
-
Changes to support the new
System.Nullable
column/properties in the Linq query syntax -
Changes to support the new
System.Nullable
column/properties query parameters -
Adds
CreateTask
andCreateAsync
cases to theContextType
discriminated union. #89 -
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. -
Added
head
custom operation to theSelectBuilder
for queries where you know there should always be at least one result. (Before you had to usetryHead
, and then manually extract the value.)