BOOLEAN is integer in SQLite internally, cast booleans to integers.
authorJan Schneider <jan@horde.org>
Fri, 14 Jan 2011 21:40:17 +0000 (22:40 +0100)
committerJan Schneider <jan@horde.org>
Fri, 14 Jan 2011 22:50:53 +0000 (23:50 +0100)
framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php
framework/Db/test/Horde/Db/Adapter/Pdo/SqliteTest.php

index dc5f098..c01e43d 100644 (file)
@@ -48,6 +48,22 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema
         return '"' . str_replace('"', '""', $name) . '"';
     }
 
+    /**
+     * @return  string
+     */
+    public function quoteTrue()
+    {
+        return '1';
+    }
+
+    /**
+     * @return  string
+     */
+    public function quoteFalse()
+    {
+        return '0';
+    }
+
 
     /*##########################################################################
     # Schema Statements
index 598f2c0..023fb46 100644 (file)
@@ -277,12 +277,12 @@ class Horde_Db_Adapter_Pdo_SqliteTest extends PHPUnit_Framework_TestCase
 
     public function testQuoteTrue()
     {
-        $this->assertEquals("'t'", $this->_conn->quote(true));
+        $this->assertEquals('1', $this->_conn->quote(true));
     }
 
     public function testQuoteFalse()
     {
-        $this->assertEquals("'f'", $this->_conn->quote(false));
+        $this->assertEquals('0', $this->_conn->quote(false));
     }
 
     public function testQuoteString()