コード例 #1
0
ファイル: DongleTest.php プロジェクト: richlove1/avc-october
 public function testPgSrvParseIfNull()
 {
     $dongle = new Dongle('pgsql');
     $result = $dongle->parseIfNull("select ifnull(1,0) from table");
     $this->assertEquals("select coalesce(1,0) from table", $result);
     $result = $dongle->parseIfNull("select IFNULL(1,0) from table");
     $this->assertEquals("select coalesce(1,0) from table", $result);
 }
コード例 #2
0
ファイル: DongleTest.php プロジェクト: mechiko/staff-october
 public function testSqliteParseGroupConcat()
 {
     $dongle = new Dongle('sqlite');
     $result = $dongle->parseGroupConcat("group_concat(first_name separator ', ')");
     $this->assertEquals("group_concat(first_name, ', ')", $result);
     $result = $dongle->parseGroupConcat("group_concat(sometable.first_name SEPARATOR ', ')");
     $this->assertEquals("group_concat(sometable.first_name, ', ')", $result);
 }
コード例 #3
0
ファイル: DongleTest.php プロジェクト: aaronleslie/aaronunix
 public function testSqliteParseBooleanExpression()
 {
     $dongle = new Dongle('sqlite');
     $result = $dongle->parseBooleanExpression("select * from table where is_true = true");
     $this->assertEquals("select * from table where is_true = 1", $result);
     $result = $dongle->parseBooleanExpression("is_true = true and is_false <> true");
     $this->assertEquals("is_true = 1 and is_false <> 1", $result);
     $result = $dongle->parseBooleanExpression("is_true = true and is_false = false or is_whatever = 2");
     $this->assertEquals("is_true = 1 and is_false = 0 or is_whatever = 2", $result);
     $result = $dongle->parseBooleanExpression("select * from table where is_true = true");
     $this->assertEquals("select * from table where is_true = 1", $result);
 }
コード例 #4
0
ファイル: _ide_helper.php プロジェクト: Smony/njphoto
 /**
  * Get the table prefix.
  *
  * @return string 
  * @static 
  */
 public static function getTablePrefix()
 {
     return \October\Rain\Database\Dongle::getTablePrefix();
 }