pqb 0.11.15 → 0.11.16

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/dist/index.d.ts CHANGED
@@ -322,6 +322,7 @@ type CommonQueryData = {
322
322
  joinTo?: QueryBase;
323
323
  joinedShapes?: JoinedShapes;
324
324
  joinedParsers?: JoinedParsers;
325
+ joinRelationAs?: string;
325
326
  schema?: string;
326
327
  select?: SelectItem[];
327
328
  as?: string;
package/dist/index.js CHANGED
@@ -3967,10 +3967,10 @@ const processSelectArg = (q, as, arg, columnAs) => {
3967
3967
  if (typeof value === "function") {
3968
3968
  const { isSubQuery } = q;
3969
3969
  q.isSubQuery = true;
3970
+ q.query.joinRelationAs = key;
3970
3971
  value = value(q);
3971
3972
  q.isSubQuery = isSubQuery;
3972
3973
  if (!orchidCore.isRaw(value) && value.joinQuery) {
3973
- value.query.as = key;
3974
3974
  value = value.joinQuery(q, value);
3975
3975
  value.query.joinedForSelect = true;
3976
3976
  let query;