* Creates a CollectionRef or QueryRef from a source object * @param source - An object with a single key-value pair * @param context - Context string for error messages (e.g., "from clause", "join clause") * @returns A tuple of [alias, ref] where alias is the source key and ref is the creat
(
source: TSource,
context: SourceClauseContext,
)
| 89 | * @returns A tuple of [alias, ref] where alias is the source key and ref is the created reference |
| 90 | */ |
| 91 | private _createRefForSource<TSource extends Source>( |
| 92 | source: TSource, |
| 93 | context: SourceClauseContext, |
| 94 | ): [string, CollectionRef | QueryRef] { |
| 95 | const refs = this._createRefsForSource(source, context) |
| 96 | if (refs.length !== 1) { |
| 97 | throw new OnlyOneSourceAllowedError(context) |
| 98 | } |
| 99 | return refs[0]! |
| 100 | } |
| 101 | |
| 102 | private _createRefsForSource<TSource extends Source>( |
| 103 | source: TSource, |
no test coverage detected