PHP 클래스 Piwik\DataAccess\LogQueryBuilder\JoinGenerator

파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$tables JoinTables

공개 메소드들

메소드 설명
__construct ( JoinTables $tables )
generate ( ) : array Generate the join sql based on the needed tables
getJoinString ( )
shouldJoinWithSelect ( )
sortTablesForJoin ( $tA, $tB )

보호된 메소드들

메소드 설명
findJoinCriteriasForTables ( Piwik\Tracker\LogTable $logTable, Piwik\Tracker\LogTable[] $availableLogTables ) : string | null
generateNonVisitJoins ( $tableName, $tableNameToJoin, $index ) This code is a bit tricky. We have to execute this right at the beginning before actually iterating over all the tables and generating the join string as we may have to delete a table from the tables. If we did not delete this table upfront, we would have maybe already added a joinString for that table, even though it will be later removed by another table. This means if we wouldn't delete/unset that table upfront, we would need to alter an already generated join string which would not be really nice code as well.

비공개 메소드들

메소드 설명
addMissingTablesNeededForJoins ( )

메소드 상세

__construct() 공개 메소드

public __construct ( JoinTables $tables )
$tables JoinTables

findJoinCriteriasForTables() 보호된 메소드

protected findJoinCriteriasForTables ( Piwik\Tracker\LogTable $logTable, Piwik\Tracker\LogTable[] $availableLogTables ) : string | null
$logTable Piwik\Tracker\LogTable
$availableLogTables Piwik\Tracker\LogTable[]
리턴 string | null returns null in case the table is already joined, or the join string if the table needs to be joined

generate() 공개 메소드

Generate the join sql based on the needed tables
public generate ( ) : array
리턴 array

generateNonVisitJoins() 보호된 메소드

Next problem is, because we are deleting a table, we have to remember the "joinOn" string for that table in a property "nonVisitJoins". Otherwise we would not be able to generate the correct "joinOn" string when actually iterating over all the tables to generate that string.
protected generateNonVisitJoins ( $tableName, $tableNameToJoin, $index )
$tableName
$tableNameToJoin
$index

getJoinString() 공개 메소드

public getJoinString ( )

shouldJoinWithSelect() 공개 메소드

sortTablesForJoin() 공개 메소드

public sortTablesForJoin ( $tA, $tB )

프로퍼티 상세

$tables 보호되어 있는 프로퍼티

protected JoinTables,Piwik\DataAccess\LogQueryBuilder $tables
리턴 JoinTables