colName

Specify a different column name for a field. By default, the field's name is used.

struct colName {}

Members

Variables

name
string name;
Undocumented in source.

Examples

import sqlbuilder.dataset;
import sqlbuilder.uda;
import sqlbuilder.dialect.mysql;
static struct table
{
    @colName("password_hash") string pwHash;
}

DataSet!table ds;
assert(select(ds.pwHash).sql ==
       "SELECT `table`.`password_hash` FROM `table`");

Meta