aboutsummaryrefslogtreecommitdiff
path: root/common/schema
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-13 10:42:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-13 10:42:46 +0200
commita9d527ffd7e4a2222d5e80c8110f092af0cb5a74 (patch)
treecd190434be960f8bbb8547619b8b97265d844ed9 /common/schema
parentc85f0af82c3abf2e7d2dfa76351a59d9884395c0 (diff)
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.
Diffstat (limited to 'common/schema')
-rw-r--r--common/schema/test.hxx22
1 files changed, 11 insertions, 11 deletions
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;
};