Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions PostgresClient.RowScanner.queryRow

1
2
3
4
5
6
7
8
module juptune.postgres.client;

Result queryRow(
    QueryArgs...
)(
    const char[] query, 
    QueryArgs args
);

Documentation

Functions mostly the same as query, with a few distinct changes.

  1. Only the first row is scanned, all other rows are discarded (hence why there's no onRow callback).

  2. If no rows are generated then a PostgresClientError.noDataerror is generated. This is less of an actual error, and more a provide an easier way of detecting the "no rows returned" case. (The values in the return value set are undefined).

It's highly recommended to add LIMIT 1onto your query as postgres will otherwise return the entire set of results which then still needs to be partially procesesd (even though they're being ignored), ultimately wasting time for no reason.

Throws

PostgresClientError.noDataif no rows are returned by your query.

Everything that querycan.

ON THIS PAGE