1 | else if ( operand.getType() == HqlSqlTokenTypes.VECTOR_EXPR ) {↵ | | 1 | else if ( operand.getType() == HqlSqlTokenTypes.VECTOR_EXPR ) {↵
|
2 | String[] rtn = new String[ operand.getNumberOfChildren() ];↵ | | 2 | String[] rtn = new String[ operand.getNumberOfChildren() ];↵
|
3 | int x = 0;↵ | | 3 | int x = 0;↵
|
4 | AST node = operand.getFirstChild();↵ | | 4 | AST node = operand.getFirstChild();↵
|
5 | while ( node != null ) {↵ | | 5 | while ( node != null ) {↵
|
6 | rtn[ x++ ] = node.getText();↵ | | 6 | rtn[ x++ ] = node.getText();↵
|
7 | node = node.getNextSibling();↵ | | 7 | node = node.getNextSibling();↵
|
8 | }↵ | | 8 | }↵
|
9 | return rtn;↵ | | 9 | return rtn;↵
|
10 | }↵ | | 10 | }↵
|
11 | else if ( operand instanceof SqlNode ) {↵ | | 11 | else if ( operand instanceof SqlNode ) {↵
|
12 | String nodeText = operand.getText();↵ | | 12 | String nodeText = operand.getText();↵
|
13 | if ( nodeText.startsWith( "(" ) ) {↵ | | 13 | if ( nodeText.startsWith( "(" ) ) {↵
|
14 | nodeText = nodeText.substring( 1 );↵ | | 14 | nodeText = nodeText.substring( 1 );↵
|
15 | }↵ | | 15 | }↵
|
16 | if ( nodeText.endsWith( ")" ) ) {↵ | | 16 | if ( nodeText.endsWith( ")" ) ) {↵
|
17 | nodeText = nodeText.substring( 0, nodeText.length() - 1 );↵ | | 17 | nodeText = nodeText.substring( 0, nodeText.length() - 1 );↵
|
18 | }↵ | | 18 | }↵
|
19 | String[] splits = StringHelper.split( ", ", nodeText );↵ | | 19 | String[] splits = StringHelper.split( ", ", nodeText );↵
|
20 | if ( count != splits.length ) {↵ | | 20 | if ( count != splits.length ) {↵
|
21 | throw new HibernateException( "SqlNode's text did not reference expected number of columns" );↵ | | 21 | throw new HibernateException( "SqlNode's text did not reference expected number of columns" );↵
|
22 | }↵ | | 22 | }↵
|
23 | return splits;↵ | | 23 | return splits;↵
|
24 | }↵ | | 24 | }↵
|
25 | else {↵ | | 25 | else {↵
|
26 | throw new HibernateException( "dont know how to extract row value elements from node : " + operand );↵ | | 26 | throw new HibernateException( "dont know how to extract row value elements from node : " + operand );↵
|
27 | | | 27 |
|