org.jooq.Field.isNotDistinctFrom()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.jooq.Field.isNotDistinctFrom()方法的一些代码示例,展示了Field.isNotDistinctFrom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.isNotDistinctFrom()方法的具体详情如下:
包路径:org.jooq.Field
类名称:Field
方法名:isNotDistinctFrom

Field.isNotDistinctFrom介绍

[英]Create a condition to check if this field is NOT DISTINCT from another value.

In SQLDialect#MYSQL and SQLDialect#MARIADB, this can be emulated through ``

[this] <=> [value]

In SQLDialect#SQLITE, this can be emulated through ``

[this] IS [value]

In databases that support INTERSECT (see Select#intersect(Select), this predicate can be emulated as follows: ``

EXISTS (SELECT [this] INTERSECT SELECT [value])

If this is not supported by the underlying database, jOOQ will render this instead: ``

CASE WHEN [this] IS     NULL AND [value] IS     NULL THEN TRUE 
WHEN [this] IS     NULL AND [value] IS NOT NULL THEN FALSE 
WHEN [this] IS NOT NULL AND [value] IS     NULL THEN FALSE 
WHEN [this] =               [value]             THEN TRUE 
ELSE                                                 FALSE 
END

SQL: this is not distinct from value
[中]创建一个条件以检查此字段是否与其他值相差NOT DISTINCT
在SQLDialogue#MYSQL和SQLDialogue#MARIADB中,这可以通过``进行模拟

[this] <=> [value]

在SQL方言#SQLITE中,这可以通过``进行模拟

[this] IS [value]

在支持INTERSECT的数据库中(请参见Select#intersect(Select),可以如下模拟此谓词:``

EXISTS (SELECT [this] INTERSECT SELECT [value])

如果基础数据库不支持此操作,jOOQ将改为呈现:``

CASE WHEN [this] IS     NULL AND [value] IS     NULL THEN TRUE 
WHEN [this] IS     NULL AND [value] IS NOT NULL THEN FALSE 
WHEN [this] IS NOT NULL AND [value] IS     NULL THEN FALSE 
WHEN [this] =               [value]             THEN TRUE 
ELSE                                                 FALSE 
END

SQL:this is not distinct from value

代码示例

代码示例来源:origin: org.jooq/jooq

CaseConditionStep<Z> when = DSL
  .choose()
  .when(field.isNotDistinctFrom(search), result);
    when = when.when(field.isNotDistinctFrom((Field<T>) more[i]), (Field<Z>) more[i + 1]);

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

CaseConditionStep<Z> when = DSL
  .decode()
  .when(field.isNotDistinctFrom(search), result);
    when = when.when(field.isNotDistinctFrom((Field<T>) more[i]), (Field<Z>) more[i + 1]);

代码示例来源:origin: org.jooq/jooq

if (left instanceof Field) {
  Field right = toField(ctx, parseConcat(ctx, null));
  return not ? ((Field) left).isNotDistinctFrom(right) : ((Field) left).isDistinctFrom(right);

相关文章