The type of the returned data. T must be a boolean, a built-in numeric type, a string, an array or a Nullable.
Condition on T | Requested database type |
---|---|
isIntegral!T || isBoolean!T | INTEGER |
isFloatingPoint!T | FLOAT |
isSomeString!T | TEXT |
isArray!T | BLOB |
is(T == Nullable!U, U...) | NULL or U |
A value of type T. The returned value results from SQLite's own conversion rules: see http://www.sqlite.org/c3ref/column_blob.html and http://www.sqlite.org/lang_expr.html#castexpr. It's then converted to T using std.conv.to!T.
Warnings: When using PeekMode.slice, the data of the slice will be invalidated when the next row is accessed. A copy of the data has to be made somehow for it to outlive the next step on the same statement.
When using referring to the column by name, the names of all the columns are tested each time this function is called: use numeric indexing for better performance.
Returns the data of a column directly.
Contrary to opIndex, the peek functions return the data directly, automatically cast to T, without the overhead of using a wrapping type (ColumnData).
When using peek to retrieve an array or a string, you can use either: