PHP Class PhpBench\Extensions\Dbal\Storage\Driver\Dbal\Visitor\SqlVisitor

显示文件 Open project: dantleech/phpbench

Public Methods

Method Description
getValidFieldNames ( ) : string[] Return the field names which can be used in queries.
visit ( PhpBench\Expression\Constraint\Constraint $constraint ) : string Convert the given constraint into an SQL query.

Private Methods

Method Description
doVisit ( PhpBench\Expression\Constraint\Constraint $constraint )
getComparatorSql ( Comparison $comparison )
getFieldNames ( PhpBench\Expression\Constraint\Constraint $constraint )
registerParamValue ( $value )
visitComparatorIn ( $fieldName, Comparison $comparison )
visitComparison ( Comparison $comparison )
visitComposite ( Composite $composite )
visitParam ( Comparison $comparison )

Method Details

getValidFieldNames() public method

NOTE: This is used for testing and can potentially be removed later with better tests etc.
See also: PhpBench\Tests\Functional\Storage\Driver\Dbal\LoaderTest
public getValidFieldNames ( ) : string[]
return string[]

visit() public method

Convert the given constraint into an SQL query.
public visit ( PhpBench\Expression\Constraint\Constraint $constraint ) : string
$constraint PhpBench\Expression\Constraint\Constraint
return string