[jOOQ/jOOQ#8944] Added support for the JSON predicate

This commit is contained in:
Lukas Eder 2019-07-16 16:30:02 +02:00
parent 562ec8a06e
commit 22b7841596
3 changed files with 6 additions and 2 deletions

View File

@ -1087,7 +1087,7 @@ extends
* Create a condition to check if this field contains JSON data.
*/
@Support({ MYSQL })
Condition isJSON();
Condition isJson();
/**
* Create a condition to check if this field does not contain JSON data.

View File

@ -663,7 +663,7 @@ abstract class AbstractField<T> extends AbstractNamed implements Field<T> {
// ------------------------------------------------------------------------
@Override
public final Condition isJSON() {
public final Condition isJson() {
return new IsJSON(this, true);
}

View File

@ -4425,6 +4425,10 @@ final class ParserImpl implements Parser {
: left instanceof Field
? ((Field) left).isNull()
: ((RowN) left).isNull();
else if (left instanceof Field && parseKeywordIf(ctx, "JSON"))
return not
? ((Field) left).isNotJson()
: ((Field) left).isJson();
parseKeyword(ctx, "DISTINCT FROM");
if (left instanceof Field) {