Minor Change Thoughts

45 views
Skip to first unread message

Jake Ginnivan

unread,
Dec 29, 2011, 2:48:41 AM12/29/11
to dbup-d...@googlegroups.com
Hey all,

I am about to push a change which increases the flexibility of DbUp if nobody has any issues.

The change allows script providers to yield SqlScripts, allowing the provider to generate scripts on the fly. The next is to unseal SqlScript which allows the script provider to return say a LazySqlScript.

I have a need to generate a sql script using code, based on data in the database.

Does anyone have any objections? Or want to see the code (I will only change the above in DbUp itself).

Cheers,
Jake

winmail.dat

Jim Burger

unread,
Dec 30, 2011, 6:21:15 AM12/30/11
to DbUp Discuss
Hi Jake,

Sound like a pretty minor change to me, so I'm personally happy with
your plans. Good ideas!

Cheers

JB
>  winmail.dat
> 6KViewDownload

Jake Ginnivan

unread,
Dec 30, 2011, 6:41:11 AM12/30/11
to dbup-d...@googlegroups.com
I have a bit of a bigger one as well :P

I was thinking about introducing a IDbCommandExecuteStrategy (or something similar), which will have a default implementation of ConnectionPerExecutionStrategy (which is how DbUp currently works).

Then I can create a ReuseConnectionWithTransactionStrategy, which allows me to use the same connection, and it will associate a transaction with that connection when connection.CreateCommand is called. That will allow us to optionally run the DbUp scripts inside a transaction :P

Still need to think about it more... We are leaning pretty heavily on DbUp in my current gig, and being able to run inside a transaction would be awesome.

Cheers,
Jake

Reply all
Reply to author
Forward
0 new messages