The attached patch provides support for the uniqueidentifier type in Microsoft SQLServer. The commit message is:
Provides support for the uniqueidentifier column type in SQLServer.
The column type is handled via the UniqueIdentierType provided by the
patch. This type marshalls a UUID value into a uniqueidentifier column
and back.
Modified the MsSqlDataTypeFactory to correctly return this new type when
it detects a UUID.
Also included are unit tests to verify all new code.
Darryl, I'm using Eclipse apply patch feature and the patch is not lining up. Perhaps you need to gen the patch without the git syntax option? Do you have other suggestion?
I've added a newer version of the patch generated using svn diff.
Thanks for redoing the patch with svn diff.
The simple issue with applying the patch is with UniqueIdentifierTypeTest: tearDown() has statement.verify(), and statement is never initialized; therefore a NPE.
That's a pretty simple thing (you would have definitely encountered it running the test) which leads me to think something is incomplete/erroneous with the patch. So regretfully I need to ask you to fix and regen a patch. :-/
One minor improvement: "uniqueidentifier" is hardcoded in a few places and I would appreciate if you extracted a "type name" public constant on the new UniqueIdentifierType class for it.
I've attached an updated patch. Fixed the NPE error and moved "uniqueidentifier" to a public constant on UniqueIdentifierType. Tests all pass.
SVN DIFF generated patch
Committed revision 1217 (svn).
Thanks for the patch.