<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>amptools &#187; midori</title>
	<atom:link href="http://www.amptools.net/tag/midori/feed" rel="self" type="application/rss+xml" />
	<link>http://www.amptools.net</link>
	<description>Simplify your life.</description>
	<lastBuildDate>Sat, 08 May 2010 07:40:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>midori notes stardate 9.14.09</title>
		<link>http://www.amptools.net/blog/midori-notes-stardate-9-14-0</link>
		<comments>http://www.amptools.net/blog/midori-notes-stardate-9-14-0#comments</comments>
		<pubDate>Tue, 15 Sep 2009 01:29:10 +0000</pubDate>
		<dc:creator>Michael Herndon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[ce]]></category>
		<category><![CDATA[dbconnectionstringbuilder]]></category>
		<category><![CDATA[midori]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postress]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.amptools.net/?p=171</guid>
		<description><![CDATA[Geek Specs
Ignore theÂ TrekkieÂ reference. Â I&#8217;ve started to work on the data abstraction layer for Midori, after narrowing down the supported out-of-the-box relational databases. Â In no particular order, they are SqlServer, SqlServerCe, MySql, Postgress, and Sqlite. Its being written in .Net 4.0 and hopefully it should port to Mono.
The main abstraction class Midori.Data.SqlAdapter makes use of the [...]]]></description>
			<content:encoded><![CDATA[<img class='gravatar' style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=899a978b0f02774a965aec11eeb0b8f4&amp;default=http://amppotls.net' alt='No Gravatar' width=48 height=48/><h2>Geek Specs</h2>
<p>Ignore theÂ TrekkieÂ reference. Â I&#8217;ve started to work on the data abstraction layer for Midori, after narrowing down the supported out-of-the-box relational databases. Â In no particular order, they are SqlServer, SqlServerCe, MySql, Postgress, and Sqlite. Its being written in .Net 4.0 and hopefully it should port to Mono.</p>
<p>The main abstraction class <a href="http://github.com/amptools-net/midori/blob/master/src/midori/Data/SqlAdapter.cs">Midori.Data.SqlAdapter</a> makes use of the System.DataÂ interfaces, like <a href="http://msdn.microsoft.com/en-us/library/system.data.idatareader.aspx">System.Data.IDataReader</a>. Obviously this class will grow as other crud operations are added. Â Each RDMS will have a class that will inherit Midori.Data.SqlAdapter, like <a href="http://github.com/amptools-net/midori/blob/master/src/midori/Data/Sqlite/SqliteAdapter.cs">Midori.Data.Sqlite.SqliteAdapter</a>, which will hold code specific to each database.</p>
<p>There is a <a href="http://github.com/amptools-net/midori/blob/master/src/midori/Data/Connection.cs">Connection</a> class that wraps other connection objects and supplies OnConnect and OnClose events, which should be helpful for closing the connection objects for methods that pass back datareader objects.</p>
<h2>Interesting Notes</h2>
<p><a href="http://msdn.microsoft.com/en-us/library/system.data.common.dbconnectionstringbuilder.aspx">System.Data.Common.DbConnectionStringBuilder</a> is a handy class for building and inspecting values of a connection string in a hash like way. Â Some Ado.Net layers, like System.Data.SqlServerCe, does not implement their own connection string builder. While it is nice to have, its not aÂ necessity, especially when the common dbconnectionstringbuilder will suffice.</p>
<p>Postgres or Npgsql, has some interesting behavior. The following select query has Pascal casing for the names of the columns.</p>
<pre class="brush: sql;">SELECT 'column1' AS Column1, 10 AS Age</pre>
<p>However when the DataReader for Postgres returns the names of the columns, they are all lowercase, all the other databases return the column aliases in the same case as specified in SQL.</p>
<p>So in the tests, I had to rewrite the query to use all lowercase column aliases, like so:</p>
<pre class="brush: sql;">SELECT 'column1' AS column1, 10 AS age</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.amptools.net/blog/midori-notes-stardate-9-14-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->