33 $configuration = array(
34 'handlerCfg' => array(
38 'driver' =>
'postgres',
43 'tx_templavoila_tmplobj' => array(
44 'mapFieldNames' => array(
45 'datastructure' =>
'ds',
49 'mapFieldNames' => array(
57 $this->subject = $this->prepareSubject(
'postgres7', $configuration);
64 $this->assertTrue($this->subject->runningADOdbDriver(
'postgres'));
72 $result = $this->subject->SELECTquery(
'*',
'be_users',
'1=1',
'',
'',
'20');
73 $expected =
'SELECT * FROM "be_users" WHERE 1 = 1 LIMIT 20';
82 $result = $this->subject->SELECTquery(
'*',
'be_users',
'1=1',
'',
'',
'20,40');
83 $expected =
'SELECT * FROM "be_users" WHERE 1 = 1 LIMIT 40 OFFSET 20';
92 $result = $this->subject->SELECTquery(
'*',
'fe_users',
'FIND_IN_SET(10, usergroup)');
93 $expected =
'SELECT * FROM "fe_users" WHERE FIND_IN_SET(10, CAST("usergroup" AS CHAR)) != 0';
102 $result = $this->subject->SELECTquery(
'*',
'tt_content',
'bodytext LIKE BINARY \'test\'');
103 $expected =
'SELECT * FROM "tt_content" WHERE "bodytext" LIKE \'test\'';
112 $result = $this->subject->SELECTquery(
'*',
'tt_content',
'bodytext NOT LIKE BINARY \'test\'');
113 $expected =
'SELECT * FROM "tt_content" WHERE "bodytext" NOT LIKE \'test\'';
122 $result = $this->subject->SELECTquery(
'*',
'tt_content',
'bodytext LIKE \'test\'');
123 $expected =
'SELECT * FROM "tt_content" WHERE "bodytext" ILIKE \'test\'';
132 $result = $this->subject->SELECTquery(
'*',
'tt_content',
'bodytext NOT LIKE \'test\'');
133 $expected =
'SELECT * FROM "tt_content" WHERE "bodytext" NOT ILIKE \'test\'';
142 $result = $this->subject->SELECTquery(
'*',
'pages',
'pid<>3');
143 $expected =
'SELECT * FROM "pages" WHERE "pid" <> 3';
152 $parseString =
'ALTER TABLE sys_file ADD uid INT(11) NOT NULL AUTO_INCREMENT';
153 $components = $this->subject->SQLparser->_callRef(
'parseALTERTABLE', $parseString);
154 $this->assertInternalType(
'array', $components);
156 $result = $this->subject->SQLparser->compileSQL($components);
157 $expected = array(
'ALTER TABLE "sys_file" ADD COLUMN "uid" SERIAL');
likeOperatorIsRemappedToIlike()
runningADOdbDriverReturnsTrueWithPostgresForPostgres8DefaultDriverConfiguration()
notLikeOperatorIsRemappedToNotIlike()
alterTableAddFieldWithAutoIncrementIsRemappedToSerialType()
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
likeBinaryOperatorIsRemappedToLike()
limitWithSkipIsProperlyRemapped()
limitIsProperlyRemapped()
notEqualAnsiOperatorCanBeParsed()
findInSetIsProperlyRemapped()
notLikeBinaryOperatorIsRemappedToNotLike()