diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-04-07 12:47:27 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-04-22 18:45:40 +0200 |
commit | 5da0df2986a62e1254d27c8cfbc383ba580555e1 (patch) | |
tree | 4f75a607951d1124f3b19062593905d12f027b3a /qt/README | |
parent | 2534ea4dd7196828ba8446921c7b552087055114 (diff) |
Update examples to include qt/basic and qt/date-time usage
Diffstat (limited to 'qt/README')
-rw-r--r-- | qt/README | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -4,13 +4,19 @@ containers, and value types with the help of the Qt profile library The example consists of the following files: -person.hxx - Describe contents. - -person-odb.hxx -person-odb.ixx -person-odb.cxx -person.sql +employee.hxx + Header file defining the 'employee' and 'employer' persistent classes. + We use QSharedPointer/QWeakPointer smart pointers provided by Qt (as + well as their lazy versions provided by the Qt profile library) to + establish a bidirectional employee-employer relationship. We also use + the QDateTime type to store the employee's date of birth and QString + to store the employee's first and last name. Finally we use QByteArray + to represent the persons genetic fingerprint. + +employee-odb.hxx +employee-odb.ixx +employee-odb.cxx +employee.sql The first three files contain the database support code and the last file contains the database schema for the employee.hxx header. @@ -39,8 +45,8 @@ driver.cxx instance. It then creates a number of 'employee' and 'employer' objects and persists them in the database. The next transaction loads all the employees of a particular employer using the employee-employer relationship. Finally, - the driver performs a database query which uses a data member of the Boost - gregorian::date type in its criterion. + the driver performs a database query which uses a data member of the Qt + QString type in its criterion. To run the example we first need to create the database schema. Using MySQL as an example, this can be achieved with the following command: |