Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparql Query2 creates incorrect count query #37

Closed
yamalight opened this issue Nov 16, 2012 · 1 comment
Closed

Sparql Query2 creates incorrect count query #37

yamalight opened this issue Nov 16, 2012 · 1 comment

Comments

@yamalight
Copy link
Member

Code:

$query = new Erfurt_Sparql_Query2();
$query->addProjectionVar(new Erfurt_Sparql_Query2_Var('resourceUri'));
$query->setCountStar(true);
$query->setDistinct();
$query->addElements(NavigationHelper::getInstancesTriples($uri, $setup));

Expected output:

SELECT ?resourceUri COUNT(DISTINCT ?resourceUri) 
WHERE { ... } 

Actual output:

SELECT DISTINCT COUNT(*) 
WHERE { ... } 
@white-gecko
Copy link
Member

This is correct behavior, since you call $query->setCountStar(true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants