Esempio n. 1
0
 table_creator_2(session & sql)
         : tests::table_creator_base(sql)
 {
     sql  << "create table soci_test(\"num_float\" float, \"num_int\" integer, "
     "\"name\" varchar(20), \"sometime\" timestamp, \"chr\" char)";
     sql.commit();
     sql.begin();
 }
Esempio n. 2
0
 table_creator_1(session & sql)
         : tests::table_creator_base(sql)
 {
     sql << "create table soci_test(id integer, val integer, c char, "
     "str varchar(20), sh smallint, ul decimal(9,0), d double precision, "
     "tm timestamp, i1 integer, i2 integer, i3 integer, name varchar(20))";
     sql.commit();
     sql.begin();
 }
Esempio n. 3
0
 table_creator_3(session & sql)
         : tests::table_creator_base(sql)
 {
     // CommonTest uses lower-case column names,
     // so we need to enforce such names here.
     // That's why column names are enclosed in ""
     sql << "create table soci_test(\"name\" varchar(100) not null, "
     "\"phone\" varchar(15))";
     sql.commit();
     sql.begin();
 }