本文整理匯總了PHP中Statement::validate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Statement::validate方法的具體用法?PHP Statement::validate怎麽用?PHP Statement::validate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Statement
的用法示例。
在下文中一共展示了Statement::validate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testValidateStatement
/**
* Test if the validate function works
*/
public function testValidateStatement()
{
$connection = $this->connection;
$collection = $this->collection;
$document = new Document();
$documentHandler = new DocumentHandler($connection);
$document->someAttribute = 'someValue';
$documentHandler->add($collection->getId(), $document);
$statement = new Statement($connection, array("query" => '', "count" => true, "batchSize" => 1000, "_sanitize" => true));
$statement->setQuery('FOR a IN `ArangoDB_PHP_TestSuite_TestCollection_01` RETURN a');
$result = $statement->validate();
$this->assertArrayHasKey('bindVars', $result, "result-array does not contain plan !");
}