Exemplo n.º 1
0
 public function assembleMapExpression(MapExpression $map)
 {
     $return = [];
     $values = $this->assembleSegments((array) $map->getValue());
     foreach ($values as $key => $value) {
         $return[] = "'{$key}':{$value}";
     }
     return '{' . implode(',', $return) . '}';
 }
Exemplo n.º 2
0
 public function testSetExpression()
 {
     $this->assertEquals("{'test':'myval','test2':2}", CqlAssembler::stringify(MapExpression::create(['test' => 'myval', 'test2' => 2])));
     $this->assertEquals("\"testfield\" + {'test'}", CqlAssembler::stringify(AdditionExpression::create(FieldExpression::create('testfield'), SetExpression::create('test'))));
 }