<?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>evardsson.com: stuff that w0rks &#187; sqlite</title>
	<atom:link href="http://www.evardsson.com/blog/tag/sqlite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evardsson.com/blog</link>
	<description>tweaks and hacks, php, python, music, home and ???</description>
	<lastBuildDate>Mon, 23 Jan 2012 18:38:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gentoo emerge conflicts: SQLite and dev-perl/DBD-SQLite</title>
		<link>http://www.evardsson.com/blog/2010/02/13/gentoo-emerge-conflicts-sqlite-and-dev-perldbd-sqlite/</link>
		<comments>http://www.evardsson.com/blog/2010/02/13/gentoo-emerge-conflicts-sqlite-and-dev-perldbd-sqlite/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 21:07:44 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Portage]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=392</guid>
		<description><![CDATA[I was having issues with my regular update schedule on my Gentoo server where I kept getting the following message: ('ebuild', '/', 'dev-db/sqlite-3.6.22-r2', 'merge') conflicts with =dev-db/sqlite-3.6.22[extensions] required by ('installed', '/', 'dev-perl/DBD-SQLite-1.29-r2', 'nomerge') Since I use SQLite fairly regularly and I like to keep it up to date I figured I would focus on getting [...]]]></description>
			<content:encoded><![CDATA[<p>I was having issues with my regular update schedule on my Gentoo server where I kept getting the following message:<br />
<code>('ebuild', '/', 'dev-db/sqlite-3.6.22-r2', 'merge') conflicts with<br />
=dev-db/sqlite-3.6.22[extensions] required by ('installed', '/', 'dev-perl/DBD-SQLite-1.29-r2', 'nomerge')</code></p>
<p>Since I use SQLite fairly regularly and I like to keep it up to date I figured I would focus on getting that updated, then worry about the Perl SQLite. (Had I known that spamassassin relies on the Perl SQLite I may have been a little more hesitant, but it all worked out ok anyway.)</p>
<p>Here is how I managed to update both SQLite and the Perl SQLite. I first unmerged dev-perl/DBD-SQLite with:<br />
<code>emerge --unmerge dev-perl/DBD-SQLite</code></p>
<p>I then updated SQLite with:<br />
<code>emerge -u sqlite</code></p>
<p>Which changed the USE settings to &#8220;-extensions&#8221; which meant that when I tried to emerge DBD-SQLite it failed due to the missing USE requirements. So I took a stab at it and did:<br />
<code>USE="extensions" emerge sqlite</code><br />
Which built cleanly without any problems, and after which a quick<br />
<code>emerge dev-perl/DBD-SQLite</code> worked great.</p>
<p>So, in a quick and easy cut and paste format the work-around is:<br />
<code>emerge --unmerge DBD-SQLite<br />
emerge -u sqlite<br />
USE="extensions" emerge sqlite<br />
emerge DBD-SQLite</code></p>
<p>Why the work-around is required I don&#8217;t know at the moment as I don&#8217;t have the time to dig through the ebuild files and figure out where the issue is, although I am sure if I had waited a bit updated ebuild files will come down the pipeline to correct the issue. (Patience is a virtue, but I have never been all that virtuous.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2010/02/13/gentoo-emerge-conflicts-sqlite-and-dev-perldbd-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Project: SPDO</title>
		<link>http://www.evardsson.com/blog/2009/01/28/new-project-spdo/</link>
		<comments>http://www.evardsson.com/blog/2009/01/28/new-project-spdo/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 02:00:40 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PostgresQL]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SPDO]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=284</guid>
		<description><![CDATA[I have just posted the (embarrassingly empty) page for my new pet project: SPDO (Sjan&#8217;s PDO) &#8211; in two flavors: PHP and Python. There are only about a thousand PDOs out there, and perhaps a dozen or so of them are really functional and (in a few cases) very polished pieces of work. So why [...]]]></description>
			<content:encoded><![CDATA[<p>I have just posted the (embarrassingly empty) page for my new pet project: SPDO (Sjan&#8217;s PDO) &#8211; in two flavors: <a href="http://www.php.net">PHP</a> and <a href="http://python.org/">Python</a>.</p>
<p>There are only about a thousand PDOs out there, and perhaps a dozen or so of them are really functional and (in a few cases) very polished pieces of work. So why am I messing with writing my own? A couple of reasons:</p>
<ol>
<li>I like to have coding signatures that are consistent, whether I am working with <a href="http://www.postgresql.org/">PostgreSQL</a>, <a href="http://www.mysql.com/">MySQL</a> or (heaven help us all) <a href="http://www.sqlite.org/">SQLite</a>.</li>
<li>I like to have coding signatures that are (reasonably) consistent across different languages &#8211; in this case Python and PHP.</li>
<li>I wanted to take advantage of Prepared Statements where I could, even though the PHP implementations of those are pretty weak (especially in the case of MySQL).</li>
</ol>
<p>Currently implemented in</p>
<ul>
<li>Python:
<ul>
<li>PostgreSQL (with prepared statements)</li>
<li>SQLite (no prepared statements).</li>
</ul>
</li>
<li>PHP
<ul>
<li>PostgreSQL (with prepared statements)</li>
<li>MySQL (with prepared statements)</li>
<li>SQLite (no prepared statements)</li>
</ul>
</li>
</ul>
<p>Here&#8217;s an example of how they work (in most simplistic terms):</p>
<pre class="brush: python">
#in Python
from pyDB import *
db = pyDB('mysite')
newid = db.insert('INSERT INTO test (name, value) VALUES (?,?)',['foo','bar'])
update_count = db.update('UPDATE test SET value=? WHERE id=?',['baz',newid])
results = db.select('SELECT * FROM test')
for row in results:
    for i in row:
        print "\t", i,"\t", row[i]
delete_count = db.delete('DELETE FROM test WHERE id=?',[newid])
</pre>
<pre class="brush: php">
//in PHP
require_once('phpdb.php');
$db = new phpDB('test');
$newid = $db->insert('INSERT INTO test (name, value) VALUES (?,?)',array('foo','bar'));
$update_count = $db->update('UPDATE test SET value=? WHERE id=?',array('baz',newid));
$results = db->select('SELECT * FROM test');
foreach($results as $row)
{
    foreach ($row as $key=>$val)
    {
        print "\t$key\t$val";
    }
}
$delete_count = $db->delete('DELETE FROM test WHERE id=?',array($newid));
</pre>
<p>The page with links to the code is in the list up top, and everything is MIT license. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2009/01/28/new-project-spdo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

