modules/jooby-couchbase/src/main/java/org/jooby/couchbase/N1Q.java
public static GroupByPath from(final String bucket, final Class<?> entityClass) {
    String alias = String.valueOf(entityClass.getSimpleName().charAt(0));
    return Select.select(alias + ".*")
        .from(i(bucket) + " " + alias)
        .where(path(alias, CLASS).eq(s(entityClass.getName())));
  }
public static GroupByPath from(final String bucket, final Class<?> entityClass) {
    String alias = String.valueOf(entityClass.getSimpleName().charAt(0));
    return Select.select(alias + ".*")
        .from(i(bucket) + " " + alias)
        .where(path(alias, CLASS).eq(s(entityClass.getName())));
  }
public static GroupByPath from ( final String bucket , final Class < ? > entityClass ) { String alias = String . valueOf ( entityClass . getSimpleName ( ) . charAt ( 0 ) ) ; return Select . select ( alias + ".*" ) . from ( i ( bucket ) + " " + alias ) . where ( path ( alias , CLASS ) . eq ( s ( entityClass . getName ( ) ) ) ) ; }
Creates a new {@link N1qlQuery} for the given class, this method build a query like:

<pre>
select b.* from bucket b where b._class = 'model.Beer'
</pre>

@param bucket Bucket name.
@param entityClass Entity class.
@return A query.
Creates a new { @link N1qlQuery } for the given class this method build a query like :