Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 /**
  * @return string
  */
 public function toStringBindVariables()
 {
     return $this->binder->toStringBindVariables();
 }