Database.single

Execute a SQL statement that returns a single row

Parameters

T

type to map columns to

sql string

SQL statement to execute

Return Value

Type: T

new instance of T with fields mapped to columns

Examples

audo model = database.single!(Model)("select * from models limit 1;");

Meta