mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
common/schema: use an ordered map for columns
For ClickHouse, we can iterate, but for other aspects, we need a direct access.
This commit is contained in:
@@ -6,9 +6,12 @@
|
||||
// will use it.
|
||||
package schema
|
||||
|
||||
import orderedmap "github.com/elliotchance/orderedmap/v2"
|
||||
|
||||
// Schema is the data schema.
|
||||
type Schema struct {
|
||||
Columns []Column
|
||||
// We use an ordered map for direct access to columns.
|
||||
Columns *orderedmap.OrderedMap[string, Column]
|
||||
|
||||
// For ClickHouse. This is the set of primary keys (order is important and
|
||||
// may not follow column order).
|
||||
|
||||
Reference in New Issue
Block a user