<?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>Sam Moffatt @ Pasamio.com &#187; Uncategorized</title>
	<atom:link href="http://pasamio.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://pasamio.com</link>
	<description>Sam Moffatt's Tech Blog: Writings on Technology</description>
	<lastBuildDate>Sat, 17 Mar 2012 03:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Copy as DBUnit bundle for Sequel Pro</title>
		<link>http://pasamio.com/2011/11/25/copy-as-dbunit-bundle-for-sequel-pro/</link>
		<comments>http://pasamio.com/2011/11/25/copy-as-dbunit-bundle-for-sequel-pro/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 09:42:13 +0000</pubDate>
		<dc:creator>pasamio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pasamio.com/?p=850</guid>
		<description><![CDATA[The other day I created a bundle for Sequel Pro that exports a series of rows in DB Unit format compatible with PHPUnit. This means that creating test data can be easy when you have existing data. Sequel Pro is a great extensible MySQL tool for Mac OS X and this bundle makes use of [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I created a bundle for <a href="http://www.sequelpro.com/">Sequel Pro</a> that exports a series of rows in DB Unit format compatible with PHPUnit. This means that creating test data can be easy when you have existing data. Sequel Pro is a great extensible MySQL tool for Mac OS X and this bundle makes use of one of those extension points.<br />
<span id="more-850"></span></p>
<p>To use the bundle, <a href="http://sammoffatt.com.au/kb-downloads/doc/5/raw">download it from my consulting knowledge base</a>, extract the zip and then double click the bundle to install it using Sequel Pro.</p>
<p>Once you get into Sequel Pro go to a query view or a content view for a table to get a result list. In the result list select your rows, right click and select &#8220;Bundles&#8221; then &#8220;Copy&#8221; and &#8220;Copy as DB Unit&#8221;. The generated data will be put on your clipboard and you can paste it into your favourite application.</p>
<p>The output looks roughly like the following:</p>
<pre>&lt;table name="articles"&gt;
	&lt;column&gt;id&lt;/column&gt;
	&lt;column&gt;fileid&lt;/column&gt;
	&lt;column&gt;tag&lt;/column&gt;
	&lt;row&gt;
			&lt;value&gt;1&lt;/value&gt;
			&lt;value&gt;1&lt;/value&gt;
			&lt;value&gt;&lt;![CDATA[testing]]&gt;&lt;/value&gt;
	&lt;/row&gt;
&lt;/table&gt;</pre>
<p>Text values are automatically wrapped in CDATA tags and numbers are straight outputted. I haven&#8217;t done a lot of testing with this but for quick and simple creation of the XML files it&#8217;s coming in handy for myself. So I&#8217;m sharing this and hopefully it will come in handy for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://pasamio.com/2011/11/25/copy-as-dbunit-bundle-for-sequel-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

