Skip to content

Releases: carl-berg/data-dude

Release 0.5.1

03 Feb 09:45
Compare
Choose a tag to compare

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

24 Jan 15:09
Compare
Choose a tag to compare

Some fixes from #14 :

  • PK columns with DEFAULT(newsequentialid()) now gets generated guids instead when using GeneratingInsertRowHandler (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

27 Dec 14:15
Compare
Choose a tag to compare

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

21 Dec 15:43
Compare
Choose a tag to compare

Fixed bug where setting a DependencyTraversalStrategy other than FollowAllForeignKeys would generate errors

Release 0.4.0-beta.7

21 Dec 14:59
Compare
Choose a tag to compare

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 keys
  • DependencyTraversalStrategy.SkipRecursiveForeignKeys: Will not attempt to generate inserts for foreign keys where the table has a reference to itself
  • DependencyTraversalStrategy.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

14 Dec 14:11
Compare
Choose a tag to compare

Fixed bug causing value providers to set FK column values

Release 0.4.0-beta.5

14 Dec 13:29
Compare
Choose a tag to compare

Fixed bug causing auto FK's to overwrite user specified keys

Release 0.4.0-beta.4

14 Dec 13:05
Compare
Choose a tag to compare

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

14 Dec 12:39
Compare
Choose a tag to compare

Handle brackets during inserts and surround schema, table and column names with brackets to avoid protected name issues

Release 0.4.0-beta.2

08 Dec 08:07
Compare
Choose a tag to compare

fb384f1 - Bugfix in how auto fk inserts work