ITADN

[Question]How to get the column names of a query result

#576OpenSteveLauC 创建于 2025-08-13
S
SteveLauCcommented
Hey, thanks for providing and maintaining this lib! I would like to know how to get the column names of a query result. I do take a look at the doc, but it looks like this is not covered. Reading the code, both `PostgresRowSequence` and `PreparedQuery` store column metadata: https://github.com/vapor/postgres-nio/blob/ca70d8cd4d50509afefb8a791144ff126600df3e/Sources/PostgresNIO/New/PostgresRowSequence.swift#L14 https://github.com/vapor/postgres-nio/blob/ca70d8cd4d50509afefb8a791144ff126600df3e/Sources/PostgresNIO/Connection/PostgresDatabase%2BPreparedQuery.swift#L32 but the fields are private, and there are no public interfaces that can be used to get the information. Thanks!
3 条评论