diff options
| author | Michael Shepanski <michael@codesynthesis.com> | 2014-11-05 14:23:54 +1100 |
|---|---|---|
| committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-10 16:48:59 +0200 |
| commit | 64b27b86025d160e49bf617143d80671ccb1e0e4 (patch) | |
| tree | 1abc0df10d797d0d845e0590c1cb9a077e4a42af /common/prepared/test.hxx | |
| parent | dee5f10d1d75eee43596ad1dfb47ecec9e0b1307 (diff) | |
Implement {query,execute}_{one,value}() shortcut functions
Useful in situations where the query is know to return at most one element
(*_one) or exactly one element (*_value).
Diffstat (limited to 'common/prepared/test.hxx')
| -rw-r--r-- | common/prepared/test.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/prepared/test.hxx b/common/prepared/test.hxx index c6e2c1e..571f4b6 100644 --- a/common/prepared/test.hxx +++ b/common/prepared/test.hxx @@ -12,9 +12,9 @@ #pragma db object struct person { - person () {} + person (): id_ (0) {} person (const std::string& name, unsigned short age) - : name_ (name), age_ (age) {} + : id_ (0), name_ (name), age_ (age) {} #pragma db id auto unsigned long id_; |
