Reformatted using clang-format

Please use clang-format before submitting code, e.g via the pre-commit
supplied in the repo (thanks AndiDog)
This commit is contained in:
rbock
2015-09-13 21:33:19 +02:00
parent 46c565c5c5
commit 09f23cea0a
168 changed files with 11984 additions and 11583 deletions

View File

@@ -24,7 +24,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if 0 // syntax example
#if 0 // syntax example
SQLPP_DECLARE_TABLE(
(table, \
SQLPP_DROP_IF_EXISTS \
@@ -45,6 +45,7 @@ SQLPP_DECLARE_TABLE(
#include "MockDb.h"
// clang-format off
SQLPP_DECLARE_TABLE(
(tab_person)
,
@@ -60,42 +61,41 @@ SQLPP_DECLARE_TABLE(
(name , varchar(255), SQLPP_NULL )
(fatal, bool , SQLPP_NOT_NULL )
)
// clang-format on
int ppgen(int, char**)
{
MockDb db;
tab_person::tab_person p;
tab_feature::tab_feature f;
MockDb db;
tab_person::tab_person p;
tab_feature::tab_feature f;
db(insert_into(f).set(f.name = "loves c++", f.fatal = false));
db(insert_into(f).set(f.name = "loves c++", f.fatal = false));
//db(insert_into(f).set(f.nahme = "loves c++", f.fatal = false));
// db(insert_into(f).set(f.nahme = "loves c++", f.fatal = false));
//db(insert_into(f).set(f.name == "loves c++", f.fatal = false));
// db(insert_into(f).set(f.name == "loves c++", f.fatal = false));
//db(insert_into(f).set(f.name = "loves c++", f.fatal = "false"));
// db(insert_into(f).set(f.name = "loves c++", f.fatal = "false"));
//db(insert_into(p).set(f.name = "loves c++", f.fatal = false));
// db(insert_into(p).set(f.name = "loves c++", f.fatal = false));
//db(insert_into(f).set(f.name = "loves c++", p.feature = 7));
// db(insert_into(f).set(f.name = "loves c++", p.feature = 7));
//db(insert_into(f).set(f.id = 42, f.name = "loves c++", f.fatal = false));
// db(insert_into(f).set(f.id = 42, f.name = "loves c++", f.fatal = false));
//db(insert_into(f).set(f.name = "loves c++"));
// db(insert_into(f).set(f.name = "loves c++"));
db(insert_into(f).default_values());
db(insert_into(f).default_values());
auto i = insert_into(p).columns(p.name, p.feature);
i.values.add(p.name = "Roland", p.feature = 1);
i.values.add(p.name = "Zaphod", p.feature = sqlpp::default_value);
db(i);
auto i = insert_into(p).columns(p.name, p.feature);
i.values.add(p.name = "Roland", p.feature = 1);
i.values.add(p.name = "Zaphod", p.feature = sqlpp::default_value);
db(i);
auto pi = db.prepare(insert_into(p).set(p.name = parameter(f.name), p.feature = parameter(p.feature)));
pi.params.name = "likes java";
pi.params.feature = true;
auto pi = db.prepare(insert_into(p).set(p.name = parameter(f.name), p.feature = parameter(p.feature)));
pi.params.name = "likes java";
pi.params.feature = true;
db(pi);
return 0;
db(pi);
return 0;
}