summaryrefslogtreecommitdiff
path: root/odb/relational/mysql/context.cxx
AgeCommit message (Collapse)AuthorFilesLines
2013-02-09Update copyright yearBoris Kolpackov1-1/+1
2013-01-24Add support for mapping char[N] to CHAR/VARCHAR database typesBoris Kolpackov1-3/+34
Also improve query support for arrays (decaying).
2012-12-12Add support for SQL name transformationsBoris Kolpackov1-0/+2
2012-09-04NULL handling improvementsBoris Kolpackov1-21/+23
Add support for specifying NULL-ness for types with built-in mapping. Handle Oracle [N]VARCHAR2 and SQLite FLOAT oddities using this mechanism instead of overriding it at the schema generation level. Also use the is_null argument that is passed to value_traits::init_image() to indicate whether the value can be NULL.
2012-07-10Add support for custom database type mappingBoris Kolpackov1-27/+68
New pragma qualifier, map, and specifiers: as, to, from. New tests: <database>/custom.
2012-04-23Polymorphic inheritance supportBoris Kolpackov1-1/+3
2012-03-07Use RAII to free select statement resultsBoris Kolpackov1-0/+1
2012-02-22Add support for composite object idsBoris Kolpackov1-8/+9
New pragma id_type (member). New test: common/composite-id. The composite example has also been updated.
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-5/+18
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.
2012-01-20Add support for case where we don't send auto object id in INSERTBoris Kolpackov1-0/+1
2012-01-20Reserve correct amount of memory for quoted idBoris Kolpackov1-1/+1
2011-10-24Generate database schema from database model instead of C++ modelBoris Kolpackov1-53/+43
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-21Rename relational::context::use_as to relational::context::need_alias_asConstantin Michael1-1/+1
2011-10-21Add a context flag indicating whether AS SQL keyword should be used for aliasesConstantin Michael1-0/+1
2011-10-21Add flag to context indicating whether to generate grow codeConstantin Michael1-0/+1
2011-09-19Rename generation_failed exception to operation_failedBoris Kolpackov1-8/+8
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-09-05Support for views; native partBoris Kolpackov1-2/+5
2011-08-31Rename comp_value() predicate to composite()Boris Kolpackov1-1/+1
2011-08-31Cosmetic changes and cleanupsBoris Kolpackov1-1/+1
Rename some functions to have consistent names. Add object() predicate.
2011-07-22Parse and store MySQL ENUM enumerator stringsBoris Kolpackov1-4/+28
2011-07-22Use quote_string() to quote enumeratorsBoris Kolpackov1-3/+1
2011-07-22Cosmetic changesBoris Kolpackov1-2/+2
2011-07-19New design for NULL semanticsBoris Kolpackov1-8/+2
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-06-30Reset range if we have two values in MySQL FLOAT parsingBoris Kolpackov1-0/+8
2011-06-30Take into account precision in MySQL FLOAT type parsingBoris Kolpackov1-1/+16
2011-04-25Add support for mapping to database types based on type aliasesBoris Kolpackov1-3/+6
This allows us to, for example, always map size_t to 64-bit type. The current implementation does not work for containers. It is not clear whether it will be possible to make it work using the GCC AST.
2011-04-19Map only continuous, zero-based enums to MySQL ENUMBoris Kolpackov1-14/+39
The others map to INT.
2011-04-19Implement automatic mapping for C++ enumsBoris Kolpackov1-0/+40
2011-03-24Generalization work for MySQL and SQLite supportBoris Kolpackov1-0/+3
2011-03-21Add support for SQLite type system, adjust code generatorsBoris Kolpackov1-3/+3
2011-03-21Separate auto increment from database typeBoris Kolpackov1-14/+0
2011-03-21Cache current context in static variableBoris Kolpackov1-0/+13
2011-03-21Cosmetic changes (function renames)Boris Kolpackov1-7/+9
2011-03-21Move to new "virtual functions in context" modelBoris Kolpackov1-6/+6
2011-03-21Split MySQL code generator into common and db-specific partsBoris Kolpackov1-0/+642
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.