private function buildDatasourceWhere()
    {
        $dataSource = $this->getConfig('dataSource');
        $includeSubFolders = $this->getConfig('includeSubFolders', false);
        $sqlFunction = false !== $includeSubFolders && 'false' !== $includeSubFolders ?
            'ISDESCENDANTNODE' : 'ISCHILDNODE';

        $node = $this->sessionManager->getSession()->getNodeByIdentifier($dataSource);

        return $sqlFunction . '(page, \'' . $node->getPath() . '\')';
    }