Exemplo n.º 1
0
 /**
  * Invalid datatypes for tuples.
  *
  * This test will ensure that an exception will occur when an invalid
  * datatype is used inside a tuple; issues from the server.
  *
  * @test
  * @ticket PHP-58
  * @expectedException \Cassandra\Exception\InvalidQueryException
  */
 public function testInvalidType()
 {
     $validType = Type::tuple(Type::int());
     $invalidType = Type::tuple(Type::varchar());
     $tableName = $this->createTable($validType);
     $options = new ExecutionOptions(array('arguments' => array("key", $invalidType->create("value"))));
     $this->insertValue($tableName, $options);
 }
Exemplo n.º 2
0
 public function notEqualTypes()
 {
     return array(array(Type::tuple(Type::int()), Type::tuple(Type::varchar())), array(Type::tuple(Type::int(), Type::varchar()), Type::tuple(Type::int(), Type::bigint())), array(Type::tuple(Type::int(), Type::varchar(), Type::varint()), Type::tuple(Type::int(), Type::varchar(), Type::bigint())), array(Type::tuple(Type::collection(Type::int()), Type::set(Type::varchar())), Type::tuple(Type::collection(Type::int()), Type::set(Type::int()))));
 }