Row.columnName

Determines the name of a particular column.

struct Row
string
columnName
(
size_t index
)

Examples

auto db = Database(":memory:");
db.run("CREATE TABLE items (name TEXT, price REAL);
        INSERT INTO items VALUES ('car', 20000);");

auto row = db.execute("SELECT name, price FROM items").front;
assert(row.columnName(1) == "price");

See Also

Meta