getParameterTypes() public method

Gets all defined query parameter types for the query being constructed indexed by parameter index or name.
public getParameterTypes ( ) : array
return array The currently defined query parameter types indexed by parameter index or name.
 /**
  * @test
  */
 public function getParameterTypesDelegatesToConcreteQueryBuilder()
 {
     $this->concreteQueryBuilder->getParameterTypes()->shouldBeCalled()->willReturn([]);
     $this->subject->getParameterTypes();
 }
示例#2
0
 /**
  * Gets all defined query parameter types for the query being constructed indexed by parameter index or name.
  *
  * @return array The currently defined query parameter types indexed by parameter index or name.
  */
 public function getParameterTypes()
 {
     return $this->queryBuilder->getParameterTypes();
 }
 /**
  * @group DBAL-959
  */
 public function testGetParameterTypes()
 {
     $qb = new QueryBuilder($this->conn);
     $qb->select('*')->from('users');
     $this->assertSame(array(), $qb->getParameterTypes());
     $qb->where('name = :name');
     $qb->setParameter('name', 'foo');
     $this->assertSame(array(), $qb->getParameterTypes());
     $qb->setParameter('name', 'foo', \PDO::PARAM_STR);
     $qb->where('is_active = :isActive');
     $qb->setParameter('isActive', true, \PDO::PARAM_BOOL);
     $this->assertSame(array('name' => \PDO::PARAM_STR, 'isActive' => \PDO::PARAM_BOOL), $qb->getParameterTypes());
 }
示例#4
0
 /**
  * Gets all defined query parameter types for the query being constructed indexed by parameter index or name.
  *
  * @return array The currently defined query parameter types indexed by parameter index or name.
  */
 public function getParameterTypes() : array
 {
     return $this->concreteQueryBuilder->getParameterTypes();
 }