Updates for db4o LINQPad Driver

I’ve updated my LINQPad driver for db4o (Here’s an feature-overview). Besides tons of little bugfixes there are also two major scenarios which are now supported:

Read Support for Enums

supported in for an enum type. db4o only stores the actual number of enum values. Previously the driver just crashed when it encountered an enum. Now it creates a ‘replacement’ enum which just shows the stored number.

However currently there’s no easy way to query for a particular enum, simply because you cannot get the enum values. (Unless you guess the generated type name right). I can add that if someone needs it.

This is how it looks like:

A enum field

A enum field

Unfortunately the enum support is a little shady, because it only can deal with enums with a value range up to a few thousends. Otherwise I would have to generate every possible number, which is too much. Nevertheless I thing it covers the common cases.

Dealing with Name Conflicts

Earlier versions just assumed that each class name is unique. When you had the same class name in different namespaces the driver crashed. Now when a naming conflict occurs it will add the namespace to its name. Also the case where a type with the same name and namespace is stored in different assemblies is covered. The driver will add the assembly name to the end of the type name.

In general I hope that name collisions are new a rare thing. The handling is by no means perfect, but should cover most cases.

This is how it looks in action:

 

Camespace Collisions

Camespace Collisions

Try it out

Download the driver here and try it out. And please report any issues or suggestions, either directly to me or on Github. Generally I only develop features which I need or which someone reports.

Tagged on: ,