public function testQuery() { $db = $this->connectionFactory->get('R'); $query = new Query("%json:%", array('json' => new Json('"spanner"'))); $this->assertSame($query->parse($db), "'\"spanner\"'"); }
public function testSqlConstant() { $db = $this->connectionFactory->get('RW'); foreach (array('', 'text') as $type) { $query = new Query("%name:{$type}%", array('name' => new Constant('DEFAULT'))); $this->assertSame($query->parse($db), 'DEFAULT'); } }
public function testSerialization() { $queryIn = new Query('f*****g bugs suck', array('annoying severity', 'x4 corrosive')); $s = $queryIn->serialize(); $queryOut = \Bond\unserialize_t($s); }
public function testQuery() { $db = $this->connectionFactory->get('R'); $query = new Query("%ip:%", array('ip' => new Inet('1.1.1.1'))); $this->assertSame($query->parse($db), "'1.1.1.1'"); }