forked from JSQLParser/JSqlParser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWithItemTest.java
More file actions
29 lines (25 loc) · 740 Bytes
/
WithItemTest.java
File metadata and controls
29 lines (25 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*-
* #%L
* JSQLParser library
* %%
* Copyright (C) 2004 - 2025 JSQLParser
* %%
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0
* #L%
*/
package net.sf.jsqlparser.statement.select;
import net.sf.jsqlparser.JSQLParserException;
import net.sf.jsqlparser.test.TestUtils;
import org.junit.jupiter.api.Test;
class WithItemTest {
@Test
void testNotMaterializedIssue2251() throws JSQLParserException {
String sqlStr = "WITH devices AS NOT MATERIALIZED (\n"
+ " SELECT\n"
+ " d.uuid AS device_uuid\n"
+ " FROM active_devices d\n"
+ ")\n"
+ "SELECT 1;";
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
}
}