[ 
https://issues.apache.org/jira/browse/JENA-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892699#comment-15892699
 ] 

Claude Warren commented on JENA-1295:
-------------------------------------

copying from email to track it here

Thank you for catching the error in the example.

This change is adding support for the Values keyword to the builders.  We are 
going to produce a VALUES block.

What we effectively have is a table with column headers and we need a way to 
specify it.

alternatively you could look at it as a table with row lables.

 The original solution looked at the problem as column headers, the latest 
proposal looks at it as row labels.  I am more inclined to row labels at this 
point specifying the var and all the values.  But I can see that some 
applications will need to set rows at a time and others columns.

Perhaps the Values builder is the best solution.  For purposes of 
conceptualization we will talk about column headers (vars) and columns of data.

So

{code}
addVar( "?x" ).addVar( "?y" );
{code}

would add 2 columns with ?x and ?y as their headers, the columns would have no 
data.

{code}
addVar( "?x", "foo", "fu" ).addVar( "?y", "bar", "baz" );
{code}

would add 2 columns with ?x and ?y as their headers and the specified data.
 
{code}
.addRow( "foo2","bar2").addRow("fu2","baz2")
{code}

would add more rows to the existing set.

{code}
addVar( Collection<Object> )
{code}

would add an entire column with the var as the first item in the collection.

{code}
addVar( "?z", Collection<Object> )
{code}

would add an entire column with the specified var.

{code}
addVars( Map<Var,Collection<Object>> )
{code}

would add the vars and data specified.

Adding an existing var will replace all the data for that var.

all vars must have the same number of items.

> Add support to VALUES in SelectBuilder
> --------------------------------------
>
>                 Key: JENA-1295
>                 URL: https://issues.apache.org/jira/browse/JENA-1295
>             Project: Apache Jena
>          Issue Type: Wish
>          Components: QueryBuilder
>            Reporter: Aleksandar Babic
>            Assignee: Claude Warren
>             Fix For: Jena 3.3.0
>
>
> It seems that QueryBuilder is lacking on support for building VALUES block, 
> or there is no obvious method to do that.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to