mirror of
https://github.com/boostorg/mysql.git
synced 2026-01-29 19:52:11 +00:00
Field view
This commit is contained in:
@@ -33,9 +33,9 @@
|
||||
void print_employee(const boost::mysql::row& employee)
|
||||
{
|
||||
std::cout << "Employee '"
|
||||
<< employee.values()[0] << " " // first_name (type boost::string_view)
|
||||
<< employee.values()[1] << "' earns " // last_name (type boost::string_view)
|
||||
<< employee.values()[2] << " dollars yearly\n"; // salary (type double)
|
||||
<< employee.fields()[0] << " " // first_name (type boost::string_view)
|
||||
<< employee.fields()[1] << "' earns " // last_name (type boost::string_view)
|
||||
<< employee.fields()[2] << " dollars yearly\n"; // salary (type double)
|
||||
}
|
||||
|
||||
void main_impl(int argc, char** argv)
|
||||
|
||||
Reference in New Issue
Block a user