public function testGetNumRowsWithBinds() { $statement = new Statement("select * from test where id in (:foo, :bar)", new Connection('test')); $binder = new \Oracle\Query\Binder($statement); $binder->bind(array(':foo' => 2, ':bar' => 4)); $fetcher = new Fetcher($statement); $this->assertEquals(2, $fetcher->getNumRows()); }
public function testFetchFirstValueAfterNumRowsWithBinds() { $statement = new Statement("select * from test where id in (:one, :two) order by id", new Connection('test')); $binder = new Binder($statement); $binder->bind(array(':one' => 1, ':two' => 2)); $fetcher = new Fetcher($statement); $fetcher->getNumRows(); $value = $fetcher->fetchFirstValue('VALUE'); $this->assertEquals('hello, world', $value); }
/** * @return string */ public function toStringBindVariables() { return $this->binder->toStringBindVariables(); }