-
Notifications
You must be signed in to change notification settings - Fork 20
/
CHANGES
312 lines (294 loc) · 15.5 KB
/
CHANGES
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
0.4.9
* Support for building with msvc 2019
* Support for mingw gcc 8.1.0
* Support noexcept for clang 6.0
* micro_http: use pool of worker threads
* Support building on Ubuntu 18.04
* Update Catch to v1.12.0
* Switch back to sprintf for compatibility
* Auth: Refactor micro_http a little
* Auth: refactor HttpMessage; add Syslog support
* Wrote a .spec file for building RPM
0.4.8
* Fix broken DomainObj::find(); Fix warnings
* Fix broken method Property::is_null(); More checks not to dereference NULL pointer
* Fix possible buffer underrun
* Sync micro_http with card-proxy
* Fix problem with removing of non existent backup file
* #28: fixing defects found by Coverity Scan
* #26: do not throw on saving a DataObject twice;
* check if logger is present in EngineBase
* #25: fixes for msvc
* Fix resource exhaustion handling in main loop of micro_http listener.
* #25: apply aliases for generated SELECT statements
* #25: generate short mnemonic aliases for tables
* Move the interlocked connection opening logic from drivers to SqlPool,
make it optional
* #24: do not use placement new/direct destructor calls: gcc5.2.1 bug?
* Improve performance of operations with keys: optimized for int IDs
* micro_http: Support setting back log size on a listening socket
* Adjust logger format
* Simplify logic of SqlPool
* Logger: get/set/check the log level
* ElementTree: easy access attributes with @ prefix
* Update micro_http server and TcpSocket wrapper class
* important: start a transaction on first select if explicit transaction
is required;
* pool: reopen a DB connection when got a DB error and no activity seen yet
on the connection;
* micro_http: added HttpHeaders class implementation in Auth example;
* micro_http: analyze Content-Type more correctly;
* micro_http: allow to set response body with no additional headers.
* Fix XInclude processing for LibXML2
* fix broken object construction for explicit joins;
* rename class ObjectList -> DataObjectList
* added test for explicit joins
* do not thow from destructor even if a connection fails to rollback
0.4.7
* New SQL dialect supported: MSSQL. Tested on Linux (TDS)
and Windows (Native Client 10).
* Explicit .select_from<>() and .join<>() modifiers for QueryObj.
* yborm_gen can be used to manually create schema objects
in database (--populate-schema) as well as to drop them
(--drop-schema) in a correct order.
* yborm_gen tools can help to extract database schema
and store it into XML format (--extract-schema),
there are still limited support for type mapping.
* New layout for SqlDialect descendant classes.
* Proper support for 'LIKE' and 'IN' operators.
* Fix comparison of Property instances.
* Make use of std::tuple if it's available (GCC >= 4.6, MSVC >= 2013).
* CMake: build-system fixes to allow easy selection of Boost instance.
* Windows: move third party components (Boost, CppUnit, LibXML2, SQLite)
into separate folders, pack up prebuilt third party libraries
for certain versions of MSVC and MinGW.
* Allow to compile in SQLite3 sources into YB.ORM dll.
* Fix Automake/CMake scripts to support building YB.ORM with Qt5
on Linux and Windows.
* Auth example: Fix possible endless loop in HTTP code.
0.4.6
* New optional inline syntax for describing the mapping scheme
within a class declaration, based on macros.
* Porting tut2 and tut4 examples to the new declaration syntax
instead of using XML configs.
* Support .range() pager in queries for different SQL dialects,
also add .first() filter based on that pager.
* Updated documantation.
* Simple constructor for Session that accepts the connection string.
* It's possible now to construct the Session with a native connection,
for example soci::session.
* Logger can be set in Session, no need to explicitly create Engine
object, in simple cases.
* Schema object can export its current configuration to XML or SQL.
* New options object for SQL generation procedure.
* Many fixes to the build scripts.
* Auth example: Fix TcpSocket::read*() to use select() and a buffer.
0.4.5
* New source tree layout: separate public includes from private,
the library source file names are now in lowercase.
* Tested to build on Windows with MS Visual Studio 2013.
* Enable building .dll libraries on Windows by default.
* Fixed Autoconf/Automake scripts to build on Ubuntu 14.04,
as well as on FreeBSD 10, Cygwin.
* Use third party boost.m4 to detect Boost at ./configure stage.
* Added stuff to make Debian packages.
* Many little API improvements.
* Basic means to create indices from schema.
* Updated tutorials.
* Auth example: refactor micro_http server.
0.4.0
* New SQL driver for SOCI library (http://soci.sourceforge.net/).
If you build with SOCI then you can use connection URL like this:
"mysql+soci://user=test1 pass=test1_pwd host=localhost service=test1_db" -
this example shows usage of native MySQL driver, and the following
one shows usage of ODBC through SOCI -
"mysql+soci_odbc://DSN=test1_dsn;UID=test1;PWD=test1_pwd".
* Support for floating point numeric types (Value::FLOAT),
i.e. float and double in C++.
* Did some profiling and made significant improvements in speed,
in particular: fixed input parameter binding; removed excessive use
of shared pointers, replaced them with intrusive pointers, especially
where thread-safety makes no sense; now the variant type Yb::Value
is optimized to make fewer memory allocations.
* Pre-built packages for Windows now make use of single
configuration file bin\yborm_env.bat, this is the place to set PATH
environment variable and to specify the connection string for
the test database.
* Auth sample: TcpSocket::accept() now can return source address of
incoming connection; fixed exception handing in micro_http.cpp.
* Tested with Borland C++ Builder 6: kind of works.
Yes, the compiler is an old piece of crap, I know.
* NOTE: there is a new field named 'D' in test table 'T_ORM_TEST',
so you may encounter problems in case you run tests on existing table,
things can be altered like this (example shown for MySQL):
mysql> alter table T_ORM_TEST add (D double precision);
0.3.4
* Implement order-by relationship property.
* Implement use-list='false' relationship property: useful for one-to-one relation.
* Add Engine::create_schema(), Engine::drop_schema().
* Basic JSON serializer from ElementTree.
* Optimize DataObject and RelationObject structures algorithmically.
* CodeGen: move Holder typedef into domain class.
* Fix domain object comparison, allowing to put them in maps and sets.
* Fix to allow actually use tables without a surrogate key
and tables with a manually assigned surrogate key.
* Fixes for better support of tables with compound keys.
* Fix flushing of new keyed DataObjects.
* Bunch of fixed typos.
0.3.3
* refactor Engine classes hierarchy
* refactor methods Engine::insert(), Engine::update(), Engine::delete()
* OrderedDict implemented
* fix finding tables and columns by name, improve speed
* reproduce bug: Assertion failed in file
../../yb-orm/lib/orm/DomainObj.h:288 (!v.is_null())
* Set fk value on linking if posible
* Rename Filters -> Expression. Add distinct and for update flags
* Extended logging for delete_object()
* Schema generated DDL statements are now iterable
* Replace method data_object() with get_data_object() in methods find() and insert().
* Rename some files to follow common style and to better reflect contents.
* Fixed a bug per request from nbuyvich: chained property references.
* fix delete_object() to behave properly when deleting a row from a link-table (n-to-n relation).
* fix yborm_gen: default value setter
* Fixed a bug per request from nbuyvich: Make it work: pg1->parent->id.is_null()
* Fixes to build under MacOSX.
* Add tut4.cpp: tree structure stored in a table. Fixes to make it work.
0.3.2
* New more intuitive syntax for filters in queries:
it's done via operator overloading.
* Domain classes now have static variable 'c' for convenient
metadata referencing, useful e.g. for filtering.
* When querying a tuple of Domain classes there will be issued
a query with join of corresponding tables.
* Query object now has got methods .one() and .count()
in addition to old method .all().
* Added Tutorial3: Querying objects.
* Fix subtle bug with compiler reordering function calls that leads to
wrong parameter orders.
* Fix assertion with re-adding object into session.
* Fix: Session must always do rollback on releasing Engine.
* Auth sample: Improve App class, use theApp::instance().new_session()
for creating sessions.
0.3.1
* Integrate native SQLITE driver for use in non-QT builds.
Now this driver is used in Windows examples by default.
Thanx to Andrey Skobenkov.
* Improved logging in the ORM core.
* Support URL for specifying connection thruout the examples
and the build system.
Now it's possible to just use --with-test-db-url option
and YBORM_URL environment variable.
* Applied patches from Sebastian Lauwers,
See closed tasks here: http://code.google.com/p/yb-orm/issues
* Fixed Session::flush_delete(): respect the depth.
* Fixed Engine::on_delete(): once prepare, many times exec.
* Cleaned up MetaData classes' interfaces for sake of convenience.
Now the generated code looks more readable.
* New class Expression replaced old Filter class.
This is the first step to develop a comprehensive query language.
* For convenience added --with-yborm-root to configure script
in Auth sample.
* Application singleton for Auth example.
0.3.0
* New and more convenient method of access to domain object properties:
via property-proxy accessors, instead of old setters/getters.
The generated domain class code becomes much cleaner.
Property accessors are implemented for simple data types,
as well as for object references and object collections.
To implement recurrent object references there is DomainHolder class.
Take a look at ProductGroup class from examples/ex2_schema.xml.
I.e. all object references are implemented using DomainHolder, and
therefore they must be dereferenced using arrow (->), not just dot (.).
This change breaks the backward compatibility of the generated code.
* The code generator utility itself is named yborm_gen now and
and is able to produce C++ domain classes as well as SQL DDL statements.
No more need for xsltproc tool. See tutorial1 for example.
Also, internally the code generator has moved to libyborm.
* Initial support for SQLite3 dialect, via QtSql driver.
* Construct SqlSource from URL, using simple URL parser.
See examples below.
1) In a QT build there are native drivers
'sqlite+qtsql:///home/vaclav/test1_db'
'mysql+qtsql://test1:test1_pwd@localhost:3306/test1_db'
as well as ODBC driver (used by default)
'mysql+qodbc3://test1:test1_pwd@test1_db'
or 'mysql://test1:test1_pwd@test1_db'
2) In a non-QT build there's only one ODBC driver available yet:
'mysql+odbc://test1:test1_pwd@test1_db'
or just 'mysql://test1:test1_pwd@test1_db'
You can pass single environment variable YBORM_URL to Engine instance,
instead of combination of YBORM_DBTYPE, YBORM_DRIVER, YBORM_DB,
YBORM_USER, YBORM_PASSWD environment variables. This is mostly
useful for testing.
0.2.5
* The Big Change: now you can build YB.ORM against wxWidgets or QT,
and use their native data structures. Boost and LibXml are not required.
Look at the "configure" script options, please.
On Windows cmake script is capable of building with QT from Nokia QT SDK.
* QT build utilizes native QtSqlDriver instead of OdbcDriver.
* query<>() function now accepts tuples of Domain classes (boost::tuple),
useful for joining tables.
* New method Session::commit() = Session::flush() + Engine::commit().
* Better support for compound foreign keys.
* Better diagnostics when yborm_gen_domain checks schema structure.
* Now the only thread that opens and closes all connections when using
SqlPool is the monitor thread.
* Propagate exceptions back from the monitor thread in SqlPool to report
about 'failed to connect' conditions immediately.
* Rename SqlConnect -> SqlConnection.
* Introduce SqlCursor: an SqlConnection now may have more
than one open SqlCursor (and SqlResultSet).
* Fix Auth example: Fix micro HTTP server in case the client connection is
closed unexpectedly. Support POST queries, other than
application/x-www-form-urlencoded.
0.2.4
Add SqlPool for database connection pooling, thanx to Nikita Buyvich.
ResultSet is now able to cache all rows, i.e. not necessary lazy.
Support for two or more distinct relations on the same
table using different foreign keys.
Add support for 32bit integer SQL data type in schema.
Build script for cmake and mingw.
Support for Postgres dialect.
Auth example: Allow to register the first user via link like this:
http://localhost:9090/registration?login=medved&pass=preved&name=Medved&status=0
Bugs fixed:
Fix a long lasted bug with misuse of ODBC function SQLBindParameter.
0.2.3
Simple logger implementation.
Reimplemented xml Writer classes from scratch (not using libxml2).
Replaced Xml::Node with more convenient class ElementTree::Element,
still depending on libxml2, but not exposing any of its internals.
Auth is a separate demo project contributed by Nikita Buyvich,
the project is a minimal HTTP server, which implements a toy auth
ptotocol using XML. Look in examples/auth.
Many bugfixes.
0.2.2
Build in schema pieces into generated classes.
Update of autogenerated code now works (AUTOGEN sections only).
Keep smart pointers to Tables and Relations.
Automatic registration of domain classes at DomainFactory singleton.
Wide Unicode partial support.
Start to work on a tutorial.
Bugs fixed:
TestDataObject::test_data_object_relink()
TestDataObjectSaveLoad::test_flush_new_linked_to_existing()
TestDataObjectSaveLoad::test_lazy_load_fail()
0.2.1
Row becomes a vector of named values.
Diffenetiate save() and save_or_update().
Implement load_collection() using DataObjectResultSet with iterator.
Three levels of lazy result sets: SqlResultSet, DataObjectResultSet and
DomainObjectResultSet template class.
0.2.0
The Big Change: new internal weak-typed row representation DataObject class
replaces old RowData class. Session class has been also rewritten from
scratch.
This solves old big problems with how object relations are represented and
who shall be responsible for holding object reference.
Now deletion (including cascading) works for objects and relations.
0.1.2
Document XML metadata format, add 'relation' element for relations
between classes.
Initial support for backrefs via managed lists, to make one-to-many
relationships more usable.