Skip to content

Conversation

tvar
Copy link
Contributor

@tvar tvar commented Apr 27, 2021

Support for accessing elements of row type.
Like this:
SELECT (t.tup).id, (tup).name FROM t
https://www.postgresql.org/docs/current/rowtypes.html#ROWTYPES-ACCESSING

Additionally remove in LEFT expression because it's just case of ROW-construct
without this fix doesn't work queries like this:
(t.tup).id IN (1, 2, 3)

@coveralls
Copy link

coveralls commented Apr 27, 2021

Coverage Status

Coverage decreased (-0.003%) to 88.791% when pulling 6908aff on tvar:row_access_support into 8eb3d9a on JSQLParser:master.

tvar added 3 commits May 12, 2021 14:25
Conflicts:
	src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java
Conflicts:
	src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
	src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java
@wumpz
Copy link
Member

wumpz commented Jun 14, 2021

Wasn't this already solved in the actual snapshot 4.1?

@tvar
Copy link
Contributor Author

tvar commented Jun 14, 2021

Wasn't this already solved in the actual snapshot 4.1?

No, I've get current master and add my test case

    @Test
    public void testSelectRowElement() throws JSQLParserException {
        assertSqlCanBeParsedAndDeparsed("SELECT (t.tup).id, (tup).name FROM t WHERE (t.tup).id IN (1, 2, 3)");
    }

It failed. I can't see any code to support access tuple elements.

@wumpz wumpz merged commit 27e6a9f into JSQLParser:master Jun 16, 2021
@wumpz
Copy link
Member

wumpz commented Jun 16, 2021

Then sorry. I merged.

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

Successfully merging this pull request may close these issues.

3 participants