60 sql <<
"Do what I want.";
61 sql <<
"Do what I want " << 123 <<
" times.";
63 std::string query =
"some query";
67 sql <<
"insert",
use(i);
68 sql <<
"select",
into(i);
70 #if defined (__LP64__) || ( __WORDSIZE == 64 ) 72 sql <<
"insert",
use(li);
73 sql <<
"select",
into(li);
77 sql <<
"insert",
use(ll);
78 sql <<
"select",
into(ll);
81 sql <<
"insert",
use(i, ind);
82 sql <<
"select",
into(i, ind);
84 std::vector<int> numbers(100);
85 sql <<
"insert",
use(numbers);
86 sql <<
"select",
into(numbers);
88 std::vector<indicator> inds(100);
89 sql <<
"insert",
use(numbers, inds);
90 sql <<
"select",
into(numbers, inds);
120 sql <<
"select person",
into(p);
125 std::cout <<
"test 1 passed" << std::endl;
129 int main(
int argc,
char** argv)
137 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
138 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
147 std::cout <<
"usage: " << argv[0]
148 <<
" connectstring\n" 149 <<
"example: " << argv[0]
150 <<
" \'connect_string_for_empty_backend\'\n";
160 std::cout <<
"\nOK, all tests passed.\n\n";
164 catch (std::exception
const & e)
166 std::cout << e.what() <<
'\n';
details::into_container< T, details::no_indicator > into(T &t)
backend_factory const & backEnd
std::string connectString
int main(int argc, char **argv)
static void from_base(values &, indicator, Person &)
details::prepare_type prepare
details::use_container< T, details::no_indicator > use(T &t, const std::string &name=std::string())
SOCI_EMPTY_DECL backend_factory const * factory_empty()
bool execute(bool withDataExchange=false)