summaryrefslogtreecommitdiff
path: root/odb/relational/mysql/schema.cxx
AgeCommit message (Collapse)AuthorFilesLines
2012-07-27Add support for defining indexesBoris Kolpackov1-0/+30
New db pragma qualifier: index. New tests: common/index, mysql/index, pgsql/index.
2012-07-27Move indexes from model scope to table scopeBoris Kolpackov1-14/+0
Conceptually, indexes belong to tables and some databases (MySQL, MSSQL) indeed treat them as such (i.e., you can have indexes with the same name in different tables).
2012-01-29Update copyright yearBoris Kolpackov1-1/+1
2012-01-29Remove author field from file headerBoris Kolpackov1-1/+0
Too much effort to maintain.
2012-01-26Implement support for database schemaBoris Kolpackov1-3/+19
New pragma qualifier: namespace. New pragma specifier: schema. The table specifier was extended to accept a schema prefix. New option: --default- schema. The common/schema test was extended to cover the new functionality.
2011-10-24Generate database schema from database model instead of C++ modelBoris Kolpackov1-102/+69
We now first create the so-called database model from C++ model and then use that to generate the database schema. The new approach also adds more general support for primary/foreign keys, including multi- column keys. Finally, for MySQL we now generate out-of-line foreign key definitions. Because MySQL does not support deferred constraints checking, deferred foreign keys are written commented out, for documentation.
2011-10-21Use base implementation instead of duplicating codeBoris Kolpackov1-10/+8
2011-09-19Rename generation_failed exception to operation_failedBoris Kolpackov1-2/+2
A more generic name is required since it is now used in both generator and processor (and in the future may be used validator).
2011-07-22Add pragma for setting type's or member's default valueBoris Kolpackov1-0/+79
New pragma: default. New test: default.
2011-07-19New design for NULL semanticsBoris Kolpackov1-1/+17
Now, instead of being specified as part of the SQL type with the type pragma, there are separate null and not_null pragmas. The not_null pragma was used to control NULL-ness of object pointers. Now the two pragmas are used consistently for object pointers and simple values (and in the future will work for composite values and containers).
2011-03-21Create indexes in separate SQL statementsBoris Kolpackov1-1/+1
This is more vendor-neutral.
2011-03-21Separate auto increment from database typeBoris Kolpackov1-0/+16
2011-03-21Split MySQL code generator into common and db-specific partsBoris Kolpackov1-0/+53
The common part (in relational/) still has some MySQL-specific parts. Also, add the notion of the current context which is used to avoid explicitly passing the context object to every generator's c-tor.