Row.columnName

Determines the name of a particular column.

struct Row
string
columnName
(
size_t index
)

Examples

1 auto db = Database(":memory:");
2 db.run("CREATE TABLE items (name TEXT, price REAL);
3         INSERT INTO items VALUES ('car', 20000);");
4 
5 auto row = db.execute("SELECT name, price FROM items").front;
6 assert(row.columnName(1) == "price");

See Also

Meta