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 testQuery() { $db = $this->connectionFactory->get('R'); $query = new Query("%json:%", array('json' => new Json('"spanner"'))); $this->assertSame($query->parse($db), "'\"spanner\"'"); }
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'"); }