From a9d527ffd7e4a2222d5e80c8110f092af0cb5a74 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Sep 2010 10:42:46 +0200 Subject: Change pragma syntax Change odb pragma namespace to db. Use qualifiers (object, value, and member) to specify type/member name. Add support for mapping C++ types to db types. --- common/schema/test.hxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'common/schema') diff --git a/common/schema/test.hxx b/common/schema/test.hxx index 14c5113..d770d8f 100644 --- a/common/schema/test.hxx +++ b/common/schema/test.hxx @@ -11,29 +11,29 @@ // Table names. // -#pragma odb object table ("TABLE_EXPLICIT") +#pragma db object table ("TABLE_EXPLICIT") struct table_explicit { - #pragma odb id + #pragma db id unsigned long id_; }; -#pragma odb object +#pragma db object struct table_implicit { - #pragma odb id + #pragma db id unsigned long id_; }; // Column names. // -#pragma odb object +#pragma db object struct column { - #pragma odb id + #pragma db id int m1; - #pragma odb column ("foo") + #pragma db column ("foo") int m2; int m_m3; @@ -45,10 +45,10 @@ struct column // Column types. // -#pragma odb object +#pragma db object struct type { - #pragma odb id + #pragma db id std::string id; // Test default C++ to DB type mapping. @@ -69,10 +69,10 @@ struct type double d; std::string str; - #pragma odb type ("INTEGER UNSIGNED") + #pragma db type ("INTEGER UNSIGNED") bool m1; - #pragma odb transient + #pragma db transient char* m2; }; -- cgit v1.1