Once a query has started being read (after /database/query/proc/Execute() has been called), the column names can be retrieved using this proc.
query.Add("CREATE TABLE example (id int, name string, foo string, bar string)")
query.Execute(db)
query.Add("SELECT * FROM example")
query.Execute(db)
= query.Columns() // "id", "name", "foo", "bar"
= query.Columns(0) // "id"