Skip to content

Commit

Permalink
Merge (Hql|Jpql|Eql)SpecificationTests with their corresponding `Qu…
Browse files Browse the repository at this point in the history
…eryRendererTests`.

Closes #3692
  • Loading branch information
mp911de committed Jan 14, 2025
1 parent 4d1f401 commit 7804874
Show file tree
Hide file tree
Showing 8 changed files with 994 additions and 4,316 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,38 @@ OR TREAT(e AS Contractor).hours > 100
""");
}

@Test // GH-3136
void substring() {

assertQuery("select substring(c.number, 1, 2) " + //
"from Call c");

assertQuery("select substring(c.number, 1) " + //
"from Call c");
}

@Test // GH-3136
void currentDateFunctions() {

assertQuery("select CURRENT_DATE " + //
"from Call c ");

assertQuery("select CURRENT_TIME " + //
"from Call c ");

assertQuery("select CURRENT_TIMESTAMP " + //
"from Call c ");

assertQuery("select LOCAL_DATE " + //
"from Call c ");

assertQuery("select LOCAL_TIME " + //
"from Call c ");

assertQuery("select LOCAL_DATETIME " + //
"from Call c ");
}

@Test
void pathExpressionsNamedParametersExample() {

Expand Down Expand Up @@ -454,18 +486,13 @@ AND INDEX(w) = 0
* @see #functionInvocationExampleWithCorrection()
*/
@Test
@Disabled(SPEC_FAULT + "FUNCTION calls needs a comparator")
void functionInvocationExample_SPEC_BUG() {
void functionInvocationExample() {

assertQuery("""
SELECT c
FROM Customer c
WHERE FUNCTION('hasGoodCredit', c.balance, c.creditLimit)
""");
}

@Test
void functionInvocationExampleWithCorrection() {

assertQuery("""
SELECT c
Expand Down
Loading

0 comments on commit 7804874

Please sign in to comment.