{"id":1954,"date":"2011-09-02T09:52:24","date_gmt":"2011-09-02T08:52:24","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=1954"},"modified":"2022-01-26T07:17:03","modified_gmt":"2022-01-26T06:17:03","slug":"updates-for-db4o-linqpad-driver","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2011\/09\/updates-for-db4o-linqpad-driver\/","title":{"rendered":"Updates for db4o LINQPad Driver"},"content":{"rendered":"<p>I\u2019ve updated my <a href=\"https:\/\/www.gamlor.info\/files\/db4oPad.lpx\">LINQPad driver for db4o<\/a> (Here&#8217;s an<a href=\"https:\/\/www.gamlor.info\/wordpress\/2011\/04\/linqpad-db4o-driver-feature-overview\/\"> feature-overview<\/a>). Besides tons of little bugfixes there are also two major scenarios which are now supported:<\/p>\n<h2>Read Support for Enums<\/h2>\n<p>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 \u2018replacement\u2019 enum which just shows the stored number.<\/p>\n<p>However currently there\u2019s 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.<\/p>\n<p>This is how it looks like:<\/p>\n<div id=\"attachment_1956\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/enum-value.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1956\" class=\"size-medium wp-image-1956\" title=\"enum-value\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/enum-value-300x149.png\" alt=\"A enum field\" width=\"300\" height=\"149\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/enum-value-300x149.png 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/enum-value.png 720w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1956\" class=\"wp-caption-text\">A enum field<\/p><\/div>\n<p>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.<\/p>\n<h2>Dealing with Name Conflicts<\/h2>\n<p>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.<\/p>\n<p>In general I hope that name collisions are new a rare thing. The handling is by no means perfect, but should cover most cases.<\/p>\n<p>This is how it looks in action:<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_1957\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/namespace-collision.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1957\" class=\"size-medium wp-image-1957\" title=\"namespace-collision\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/namespace-collision-300x106.png\" alt=\"Camespace Collisions\" width=\"300\" height=\"106\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/namespace-collision-300x106.png 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/09\/namespace-collision.png 944w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1957\" class=\"wp-caption-text\">Camespace Collisions<\/p><\/div>\n<h2>Try it out<\/h2>\n<p>Download the driver <a href=\"https:\/\/www.gamlor.info\/files\/db4oPad.lpx\">here<\/a> and try it out. And please report any issues or suggestions, either directly to me or on <a href=\"https:\/\/github.com\/gamlerhart\/db4opad\/issues\">Github<\/a>. Generally I only develop features which I need or which someone reports.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve updated my LINQPad driver for db4o (Here&#8217;s an feature-overview). Besides tons of little bugfixes there are also two major scenarios which are now supported: Read Support for Enums supported&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[126,150],"tags":[100,214],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1954"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1954"}],"version-history":[{"count":8,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1954\/revisions"}],"predecessor-version":[{"id":3927,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1954\/revisions\/3927"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}