My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright Jean-Louis Leroy 2009.
// Use, modification, and distribution are subject to the Boost Software License, Version 1.0.

#ifndef BOOST_RDB_TEST_TABLES_HPP
#define BOOST_RDB_TEST_TABLES_HPP

namespace boost { namespace rdb { namespace test {

namespace springfield {
//[ schema
BOOST_RDB_BEGIN_TABLE(person)
BOOST_RDB_COLUMN(id, integer)
BOOST_RDB_COLUMN(name, varchar<20>)
BOOST_RDB_COLUMN(first_name, varchar<30>)
BOOST_RDB_COLUMN(age, float_)
BOOST_RDB_END_TABLE(person)

BOOST_RDB_BEGIN_TABLE(partner)
BOOST_RDB_COLUMN(husband, integer)
BOOST_RDB_COLUMN(wife, integer)
BOOST_RDB_END_TABLE(partner)
//]
}

namespace object_model {
BOOST_RDB_BEGIN_TABLE(person)
BOOST_RDB_COLUMN(id, integer)
BOOST_RDB_COLUMN(nationality, varchar<20>)
BOOST_RDB_END_TABLE(person)

BOOST_RDB_BEGIN_TABLE(natural_person)
BOOST_RDB_COLUMN(id, integer)
BOOST_RDB_COLUMN(name, varchar<20>)
BOOST_RDB_COLUMN(first_name, varchar<30>)
BOOST_RDB_COLUMN(age, integer)
BOOST_RDB_END_TABLE(natural_person)

BOOST_RDB_BEGIN_TABLE(legal_person)
BOOST_RDB_COLUMN(id, integer)
BOOST_RDB_COLUMN(name, varchar<20>)
BOOST_RDB_END_TABLE(legal_person)
}

} } }

#endif

Change log

e259857bcd1a by j...@yorel.be on Dec 10, 2009   Diff
namespace reorganization for dynamic stuff
Go to: 
Project members, sign in to write a code review

Older revisions

735743d8909e by j...@yorel.be on Nov 18, 2009   Diff
sql type `float`, used in examples
46eca9a38afe by j...@yorel.be on Nov 17, 2009   Diff
recover from bad merge
da77e1074867 by j...@yorel.be on Nov 17, 2009   Diff
Backed out changeset fb9e8b57ca54
All revisions of this file

File info

Size: 1295 bytes, 46 lines
Powered by Google Project Hosting