time-link / timelink-kleio

Provides translation of files in Kleio notation into XML and other formats. Part of Timelink.
1 stars 0 forks source link

database mappings defined in json #24

Open joaquimrcarvalho opened 9 months ago

joaquimrcarvalho commented 9 months ago
{
    "mappings": [
        {
            "name": "entity",
            "class": "entity"
        },
        {
            "name": "person",
            "class": "person"
        },
        {
            "name": "object",
            "class": "object"
        }
    ],
    "classes": [
        {
            "name": "person",
            "super": "entity",
            "table": "persons",
            "attributes": [
                {
                    "name": "id",
                    "column": "id",
                    "baseclass": "id",
                    "coltype": "varchar",
                    "colsize": 64,
                    "colprecision": 0,
                    "pkey": 1
                }
            ]
        }
    ]
}
joaquimrcarvalho commented 9 months ago

This would affect a few lines: https://github.com/time-link/timelink-kleio/blob/joaquimrcarvalho/issue16/src/gactoxml.pl#L1700-L1703

And two new predicates: mappings_from_json, classes_from_json.

joaquimrcarvalho commented 3 months ago

See https://www.mssqltips.com/sqlservertip/6270/save-sql-server-database-structure-as-json/.