接口 Table<E>

所有超级接口:
Props, Selection<E>, org.babyfish.jimmer.meta.spi.TableDelegate<E>, TableTypeProvider
所有已知子接口:
AssociationTable<SE,ST,TE,TT>, TableEx<E>, TableImplementor<E>, TableProxy<E>
所有已知实现类:
AbstractTypedTable, AssociationTableProxyImpl, UntypedJoinDisabledTableProxy

public interface Table<E> extends org.babyfish.jimmer.meta.spi.TableDelegate<E>, TableTypeProvider, Selection<E>, Props
  • 方法详细资料

    • eq

      Predicate eq(Table<E> other)
      Shortcut for `this.id().eq(other.id())`
    • eq

      Predicate eq(Example<E> example)
      QBE
    • eq

      Predicate eq(E example)
      QBE
    • eq

      Predicate eq(org.babyfish.jimmer.View<E> view)
      QBE
    • isNull

      Predicate isNull()
    • isNotNull

      Predicate isNotNull()
    • count

    • count

      NumericExpression<Long> count(boolean distinct)
    • fetch

      Selection<E> fetch(Fetcher<E> fetcher)
    • fetch

      <V extends org.babyfish.jimmer.View<E>> Selection<V> fetch(Class<V> viewType)
    • asTableEx

      TableEx<E> asTableEx()

      If you must convert table types using the "asTableEx()" function to find corresponding properties in IDE's intelligent suggestions, it likely indicates you are performing table join operations on collection-associated properties, for example:

      
       BookTable table = BookTable.$;
       sql
           .create(table)
           // Table join based on collection association `Book.authors`
           .where(table.asTableEx().authors().firstName().eq("Alex"))
           select(table)
           .execute();
       

      This usage will lead to data duplication, and whether using SQL-level or application-level approaches, you'll need to handle data distinction yourself. More importantly, this duplication will invalidate the pagination mechanism.

      In fact, this usage is not recommended, and the purpose of "asTableEx()" is to remind you that you're using a feature that might cause problems. In most cases, sub-queries, especially implicit sub-queries, are more recommended. For example:

      
       BookTable table = BookTable.$;
       sql.createQuery(table)
           .where(
               table.authors(author ->
                  author.firstName().eq("Alex")
               )
           )
           .select(table)
           .execute();