/** * Clear data from the query or a specific clause of the query. * * @param string $clause Optionally, the name of the clause to clear, or nothing to clear the whole query. * * @return PgsqlQuery Returns this object to allow chaining. * * @since __DEPLOY_VERSION__ */ public function clear($clause = null) { switch ($clause) { case null: $this->bounded = array(); break; } return parent::clear($clause); }
/** * Test for RETURNING clause. * * @return void * * @since 1.0 */ public function testReturning() { $q = new PostgresqlQuery($this->dbo); $this->assertThat($q->returning('id'), $this->identicalTo($q), 'Tests chaining.'); $this->assertThat(trim($q->returning), $this->equalTo('RETURNING id'), 'Tests rendered value.'); }