blob: 1aa4e89c3aefa1d585e2a46a42e2cfd16f5ecf3a (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
! Type mapping broken for containers
struct int_vector {std::vector<int> v;};
typedef std::vector<int> vector_int;
#pragma db map type(int_vector) as(vector_int) to((?).v) from(int_vector(?))
! Need to use SERIALIZABLE isolation level on all databases
See private email with subject like "ODB concurrency behavior".
! Add note on PG "transaction terminated after failed statement" [doc]
For instance, the schema_catalog::migrate() logic doesn't work in case
the schema does not exist (SELECT tries to get the version, fails, and
takes down the transaction). Workaround: run schema_version() out of
transaction and then decide yourself whether to create or migrate the
schema.
! Unsigned C++ to signed database mapping and comparison
While ODB can roundtrip the values, comparison at the database level (e.g.,
in queries will be broken). Probably need to change to use the next signed
type. Probably for 3.0.0.
! Still need to update database/factory documentation [doc]
This is related to the database return-by-value changes.
! Mac OS excetion/error handling not working (-D in options file)
! Use to_string()/sto*() instead of stringstream [c++11]
Those use the "C" locale instead of the default locale.
See email from <andrey.psv@gmail.com>/14-Jul-2015.
- Locale issue in Qt Date/Time parsing in SQLite
See email from <adanesh@noornet.net>/08-Sep-2015.
! Documentation needed [doc]
- points_to pragma
- inverse and composite members support/points_to
- after/before pragmas (must follow virtual)
- (!) database placeholder in modifiers
- foreign key in primary key technique
- nested container emulation technique
- SQL Server only allows CREATE DATABASE in auto-commit mode [mssql]
See email from <andrey.psv@gmail.com>/23-May-2015.
- Macro expansion in code fragment pragmas
Currently we expand macros in all pragmas. This is probably the wrong
semantics for "code fragment" macros like access/get/set. I wonder if
there is a way to disable macros expansion for certain parts of the
pragma (remember, our pragma can have multiple specifiers).
- Document character encoding used to return text for each database [doc]
- Add noexcept to move construction and assignment [c++11]
Without noexcept some code (e.g., swap()) may have to resorts to copy.
! Command Line Tools required for ODB binary package on Mac OS [macosx]
It seems without them there are no standard headers in /usr/include. Need
to test and document.
! Private GCC in Mac OS ODB binary crashes on Yosemite [macosx]
The symptom is:
odb: error: unable to extract profile paths
See email from <axel50397@gmail.com>/23-Oct-2014.
- Position pragmas in macros don't work
#include <odb/core.hxx>
#define ODB_COUNT(obj, key) \
PRAGMA_DB(view object(obj)) \
struct obj##_count \
{ \
PRAGMA_DB(column("count(" + obj::key + ")")) \
int count; \
};
/*
#define ODB_COUNT(obj, key) \
struct obj##_count \
{ \
int count; \
}; \
PRAGMA_DB(view(obj##_count) object(obj)) \
PRAGMA_DB(member(obj##_count::count) \
column("count(" + obj::key + ")")) \
*/
#pragma db object
struct test
{
#pragma db id
int id;
};
ODB_COUNT(test, id)
The reason it doesn't work is because we use the macro expansion
point as the location of the pragmas inside the macro. Fixing this
properly won't be simple. Perhaps simply document as a limitation
where we describe PRAGMA_DB.
|