Releases: carl-berg/data-dude
Release 0.5.1
Release notes
- #16 - Bugfix causing specified null values in insert to be ignored when using auto fk's
- Moved string -> DbType mappings into static dictionary on DataDudeContext so it can be manipulated if needed
Release 0.5.0
Some fixes from #14 :
- PK columns with
DEFAULT(newsequentialid())
now gets generated guids instead when usingGeneratingInsertRowHandler
(could be improved upon in the future to actually use sequential values) - Schema now includes table indexes
numeric
data type remapped
Release 0.4.0
Fixes in #13
Throw an InsertRowHandlerMissing
when no row handlers can handle a specified insert with information on workaround using OutputInsertRowHandler
(or plugging in your own):
dude.ConfigureInsert(x => x.InsertRowHandlers.Add(new OutputInsertRowHandler()))
Schema caching ability which is turned on by default for SqlServerSchemaLoader
and can be turned off like so
dude.Configure(x => x.SchemaLoader.CacheSchema = false);
Custom configured values providers are now inserted first (before the default ones) meaning that value type should be NotSet
when invoked the first time.
dude.ConfigureCustomColumnValue((column, value) => column.Name == "Name" && value.Type == ColumnValueType.NotSet, () => "Custom default")
Release 0.4.0-beta.8
Fixed bug where setting a DependencyTraversalStrategy
other than FollowAllForeignKeys
would generate errors
Release 0.4.0-beta.7
Introduced DependencyTraversalStrategy
so one can specify which dependencies to automatically insert when Auto FK's are turned on. This can be configured like so:
new Dude()
.EnableAutomaticForeignKeys(x =>
{
x.AddMissingForeignKeys = true;
x.DependencyTraversalStrategy = DependencyTraversalStrategy.SkipNullableForeignKeys
})
DataDude comes preconfigured with 3 strategies:
DependencyTraversalStrategy.FollowAllForeignKeys
: Default strategy will attempt to generate inserts for all foreign keysDependencyTraversalStrategy.SkipRecursiveForeignKeys
: Will not attempt to generate inserts for foreign keys where the table has a reference to itselfDependencyTraversalStrategy.SkipNullableForeignKeys
: Will not attempt to generate inserts for nullable foreign keys
If you want more control you can create your own class that implements IDependencyTraversalStrategy
and plug it in like above.
Release 0.4.0-beta.6
Fixed bug causing value providers to set FK column values
Release 0.4.0-beta.5
Fixed bug causing auto FK's to overwrite user specified keys
Release 0.4.0-beta.4
Simplified and improved setting custom values so they don't have to be constants. Previous version was invoked like so:
ConfigureCustomColumnValues(((column, value) => column.Name == "Active", true))
New version is invoked like so:
ConfigureCustomColumnValue((column, value) => column.Name == "Active", () => true)
Release 0.4.0-beta.3
Handle brackets during inserts and surround schema, table and column names with brackets to avoid protected name issues
Release 0.4.0-beta.2
fb384f1 - Bugfix in how auto fk inserts work