MCPcopy Create free account
hub / github.com/andywer/postguard / resolveToConcreteColumnRefs

Function resolveToConcreteColumnRefs

src/resolver.ts:123–131  ·  view source on GitHub ↗
(
  columnRefs: ColumnReference[],
  tables: TableSchema[]
)

Source from the content-addressed store, hash-verified

121}
122
123export function resolveToConcreteColumnRefs(
124 columnRefs: ColumnReference[],
125 tables: TableSchema[]
126): ColumnReference[] {
127 return flatMap(columnRefs, columnRef => {
128 if (columnRef.columnName !== "*") return [columnRef]
129 return resolveStarColumnRef(columnRef, tables)
130 })
131}
132
133export function resolveColumnReferences(query: Query, tables: TableSchema[]): ColumnReference[] {
134 const columnsReturnedBySubqueries = flatMap(query.subqueries, subquery => {

Callers 1

resolveColumnReferencesFunction · 0.85

Calls 2

resolveStarColumnRefFunction · 0.85
flatMapFunction · 0.70

Tested by

no test coverage detected