hysteria-orm 11.0.10 → 11.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.cts CHANGED
@@ -4520,6 +4520,20 @@ declare class QueryBuilder<T extends Model = any, S extends Record<string, any>
4520
4520
  * @description Executes the query and retrieves the count of results, it ignores all select, group by, order by, limit and offset clauses if they are present.
4521
4521
  */
4522
4522
  getCount(column?: string): Promise<number>;
4523
+ /**
4524
+ * @description Whether the query's row cardinality differs from the number of underlying
4525
+ * rows (e.g. GROUP BY, HAVING, DISTINCT). When true, a plain `count(*)` after clearing the
4526
+ * clauses would return the wrong number, so the query must be wrapped as a derived table.
4527
+ */
4528
+ protected needsDerivedTableCount(): boolean;
4529
+ /**
4530
+ * @description Mutates this query builder into a `count(*)` query. For queries whose
4531
+ * cardinality differs from the underlying row count (GROUP BY / HAVING / DISTINCT), the
4532
+ * original query is wrapped as a derived table so the count reflects the number of groups
4533
+ * / distinct rows instead of the raw row count. Otherwise behaves like the historical
4534
+ * behavior of clearing select/group/order/limit/offset.
4535
+ */
4536
+ protected buildCountQuery(column?: string): void;
4523
4537
  /**
4524
4538
  * @description Executes the query and retrieves the maximum value of a column, it ignores all select, group by, order by, limit and offset clauses if they are present.
4525
4539
  */
package/lib/index.d.ts CHANGED
@@ -4520,6 +4520,20 @@ declare class QueryBuilder<T extends Model = any, S extends Record<string, any>
4520
4520
  * @description Executes the query and retrieves the count of results, it ignores all select, group by, order by, limit and offset clauses if they are present.
4521
4521
  */
4522
4522
  getCount(column?: string): Promise<number>;
4523
+ /**
4524
+ * @description Whether the query's row cardinality differs from the number of underlying
4525
+ * rows (e.g. GROUP BY, HAVING, DISTINCT). When true, a plain `count(*)` after clearing the
4526
+ * clauses would return the wrong number, so the query must be wrapped as a derived table.
4527
+ */
4528
+ protected needsDerivedTableCount(): boolean;
4529
+ /**
4530
+ * @description Mutates this query builder into a `count(*)` query. For queries whose
4531
+ * cardinality differs from the underlying row count (GROUP BY / HAVING / DISTINCT), the
4532
+ * original query is wrapped as a derived table so the count reflects the number of groups
4533
+ * / distinct rows instead of the raw row count. Otherwise behaves like the historical
4534
+ * behavior of clearing select/group/order/limit/offset.
4535
+ */
4536
+ protected buildCountQuery(column?: string): void;
4523
4537
  /**
4524
4538
  * @description Executes the query and retrieves the maximum value of a column, it ignores all select, group by, order by, limit and offset clauses if they are present.
4525
4539
  */