[jOOQ/jOOQ#11641] More SPLIT_PART fixes and tests
This commit is contained in:
parent
7c2e851b14
commit
0e0cb694d4
@ -17950,7 +17950,7 @@ public class DSL {
|
||||
* @param n The token number (1-based).
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ MYSQL, POSTGRES })
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static Field<String> splitPart(Field<String> string, @Stringly.Param String delimiter, Number n) {
|
||||
return new SplitPart(string, Tools.field(delimiter), Tools.field(n));
|
||||
}
|
||||
@ -17965,7 +17965,7 @@ public class DSL {
|
||||
* @param n The token number (1-based).
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ MYSQL, POSTGRES })
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static Field<String> splitPart(Field<String> string, @Stringly.Param String delimiter, Field<? extends Number> n) {
|
||||
return new SplitPart(string, Tools.field(delimiter), n);
|
||||
}
|
||||
@ -17980,7 +17980,7 @@ public class DSL {
|
||||
* @param n The token number (1-based).
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ MYSQL, POSTGRES })
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static Field<String> splitPart(Field<String> string, Field<String> delimiter, Number n) {
|
||||
return new SplitPart(string, delimiter, Tools.field(n));
|
||||
}
|
||||
@ -17995,7 +17995,7 @@ public class DSL {
|
||||
* @param n The token number (1-based).
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ MYSQL, POSTGRES })
|
||||
@Support({ MARIADB, MYSQL, POSTGRES })
|
||||
public static Field<String> splitPart(Field<String> string, Field<String> delimiter, Field<? extends Number> n) {
|
||||
return new SplitPart(string, delimiter, n);
|
||||
}
|
||||
|
||||
@ -107,6 +107,7 @@ extends
|
||||
|
||||
|
||||
|
||||
case MARIADB:
|
||||
case MYSQL:
|
||||
Field<String> rS = DSL.field(name("s"), String.class);
|
||||
Field<Integer> rN = DSL.field(name("n"), int.class);
|
||||
@ -129,7 +130,7 @@ extends
|
||||
|
||||
visitSubquery(
|
||||
ctx,
|
||||
withRecursive(s1, s2).select(DSL.field(name("x"))).from(s2).where(s2.field("n").eq((Field) n))
|
||||
withRecursive(s1, s2).select(DSL.coalesce(DSL.max(DSL.field(name("x"))), inline(""))).from(s2).where(s2.field("n").eq((Field) n))
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user