Skip to content

Commit 0121554

Browse files
authored
Fix ResultColumnMixin - add table reference for QueryResult (#687)
* Update ResultColumnMixin.kt QueryResult.table was being hardcoded as `null`, add the table reference so that `queryExposed()` QueryResult.table can be used Table reference could also be a TableAlias element. * Update CHANGELOG.md
1 parent 1c31ed5 commit 0121554

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Fix ResultColumnMixin - add table reference for QueryResult https://github.com/sqldelight/sql-psi/pull/687
56
- In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/.
67
- Fix unwanted environment log warnings https://github.com/sqldelight/sql-psi/pull/679
78

core/src/main/kotlin/com/alecstrong/sql/psi/core/psi/mixins/ResultColumnMixin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal abstract class ResultColumnMixin(
4444
}
4545

4646
return@lazy queryAvailable.fold(emptyList<QueryResult>()) { left, right ->
47-
left + right.copy(table = null, columns = right.columns.filter { !it.hiddenByUsing })
47+
left + right.copy(table = right.table, columns = right.columns.filter { !it.hiddenByUsing })
4848
}
4949
}
5050

0 commit comments

Comments
 (0)