Jackalope\Transport\DoctrineDBAL\Client::getSystemIdForNode PHP Method

getSystemIdForNode() private method

Get the database primary key for node.
private getSystemIdForNode ( string $identifier, string $workspaceName = null ) : boolean | string
$identifier string Path of the identifier
$workspaceName string To overwrite the current workspace
return boolean | string The database id
    private function getSystemIdForNode($identifier, $workspaceName = null)
    {
        if (null === $workspaceName) {
            $workspaceName = $this->workspaceName;
        }
        if (UUIDHelper::isUUID($identifier)) {
            $query = 'SELECT id FROM phpcr_nodes WHERE identifier = ? AND workspace_name = ?';
        } else {
            if ($this->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOMySql\Driver) {
                $query = 'SELECT id FROM phpcr_nodes WHERE path COLLATE utf8_bin = ? AND workspace_name = ?';
            } else {
                $query = 'SELECT id FROM phpcr_nodes WHERE path = ? AND workspace_name = ?';
            }
        }
        $nodeId = $this->getConnection()->fetchColumn($query, array($identifier, $workspaceName));
        return $nodeId ?: false;
    }