class documentation
class FeatureInfo: (source)
Metadata descriptor for a single GBD feature.
Created by Schema when inspecting a database or loading a CSV, and
returned by Database.find.
The default attribute encodes feature cardinality:
- default is None -> 1:n feature: stored in a dedicated table {name}(hash TEXT, value TEXT, UNIQUE(hash, value)). The column is always "value".
- default is not None -> 1:1 feature: stored as a column named name in the central features table with that default value.
| Instance Variable | column |
Column within table that holds the value. 1:1 -> equals name; 1:n -> "value". |
| Instance Variable | database |
Logical database name derived from the file path (e.g. "cnf_sc2021"). |
| Instance Variable | default |
SQLite default value, or None for 1:n features. |
| Instance Variable | name |
Logical feature name used in GBD queries (e.g. "local"). |
| Instance Variable | table |
SQLite table that stores the feature value. 1:1 -> "features"; 1:n -> the feature name itself. |