empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jan (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Created] (EMPIREDB-252) Add Support for database specific CodeGenParser
Date Fri, 02 Dec 2016 10:11:58 GMT
jan created EMPIREDB-252:
----------------------------

             Summary: Add Support for database specific CodeGenParser
                 Key: EMPIREDB-252
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-252
             Project: Empire-DB
          Issue Type: Improvement
          Components: CodeGenerator
    Affects Versions: empire-db-2.4.5
            Reporter: jan
            Assignee: jan
            Priority: Minor
             Fix For: empire-db-2.4.6


When using the default CodeGenParser with a MySQL database you will get

C1 = addColumn("C1", DataType.INTEGER, 10.0, true, null);

for a column defined in the database as

+-----------------------------+---------------------+------+-----+------------+-------+
| Field                       | Type                | Null | Key | Default    | Extra |
+-----------------------------+---------------------+------+-----+------------+-------+
| C1                          | int(10)             | NO   | PRI | NULL       |       |
+-----------------------------+---------------------+------+-----+------------+-------+

"(10)" is just an indicator for the column display width.

If you defined a TINYINT(2) (1 byte), it will result in an SMALLINT (2 bytes).

It should be possible to make database specific "calculations" of the column size.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message