|
|
@ -18,7 +18,7 @@ const getAst = async ({ |
|
|
|
nested: { ...(query?.nested || {}) }, |
|
|
|
nested: { ...(query?.nested || {}) }, |
|
|
|
fieldsSet: new Set(), |
|
|
|
fieldsSet: new Set(), |
|
|
|
}, |
|
|
|
}, |
|
|
|
getHiddenColumn = false, |
|
|
|
getHiddenColumn = query?.['getHiddenColumn'], |
|
|
|
}: { |
|
|
|
}: { |
|
|
|
query?: RequestQuery; |
|
|
|
query?: RequestQuery; |
|
|
|
extractOnlyPrimaries?: boolean; |
|
|
|
extractOnlyPrimaries?: boolean; |
|
|
@ -130,23 +130,25 @@ const getAst = async ({ |
|
|
|
).ast; |
|
|
|
).ast; |
|
|
|
} |
|
|
|
} |
|
|
|
let isRequested; |
|
|
|
let isRequested; |
|
|
|
|
|
|
|
|
|
|
|
if (getHiddenColumn) { |
|
|
|
if (getHiddenColumn) { |
|
|
|
isRequested = |
|
|
|
isRequested = |
|
|
|
!isSystemColumn(col) || |
|
|
|
!isSystemColumn(col) || |
|
|
|
col.column_name === 'created_at' || |
|
|
|
col.column_name === 'created_at' || |
|
|
|
col.column_name === 'updated_at' || |
|
|
|
col.column_name === 'updated_at' || |
|
|
|
col.pk; |
|
|
|
col.pk; |
|
|
|
} else { |
|
|
|
} else if (allowedCols && (!includePkByDefault || !col.pk)) { |
|
|
|
isRequested = |
|
|
|
isRequested = |
|
|
|
allowedCols && (!includePkByDefault || !col.pk) |
|
|
|
allowedCols[col.id] && |
|
|
|
? allowedCols[col.id] && |
|
|
|
(!isSystemColumn(col) || view.show_system_fields || col.pv) && |
|
|
|
(!isSystemColumn(col) || view.show_system_fields || col.pv) && |
|
|
|
(!fields?.length || fields.includes(col.title)) && |
|
|
|
(!fields?.length || fields.includes(col.title)) && |
|
|
|
value; |
|
|
|
value |
|
|
|
} else if (fields?.length) { |
|
|
|
: fields?.length |
|
|
|
isRequested = fields.includes(col.title) && value; |
|
|
|
? fields.includes(col.title) && value |
|
|
|
} else { |
|
|
|
: value; |
|
|
|
isRequested = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isRequested || col.pk) await extractDependencies(col, dependencyFields); |
|
|
|
if (isRequested || col.pk) await extractDependencies(col, dependencyFields); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|