Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporter: Consider full ili2db settings in metaconfig file #796

Open
signedav opened this issue Mar 16, 2023 · 2 comments
Open

Exporter: Consider full ili2db settings in metaconfig file #796

signedav opened this issue Mar 16, 2023 · 2 comments
Labels
enhancement usabILItyhub formerly known as InterlisPlus

Comments

@signedav
Copy link
Member

Goal

To be able to create exactly the same database.

Current status

Currently the UsabILIty Hub Exporter parses all the parameters known and controlled by Model Baker. Those are:

Manually set by User (in Model Baker GUI)

--smart1Inheritance/--smart2Inheritance
--createBasketCol
--strokeArcs
--defaultSrsCode
--defaultSrsAuth
--iliMetaAttrs (for ini/toml)
--preScript
--postScript
--models

Automatically set by Model Baker

--coalesceCatalogueRef
--createEnumTabs
--createEnumTabsWithId
--createNumChecks
--createUnique
--createFk
--createFkIdx
--coalesceMultiSurface
--coalesceMultiLine
--coalesceMultiPoint
--coalesceArray
--beautifyEnumDispName
--createGeomIdx
--createMetaInfo
--expandMultilingual
--createTypeConstraint
--createTidCol

ili2db_settings table

"ch.ehi.ili2db.inheritanceTrafo" == "smart1": "smart1Inheritance" = True
"ch.ehi.ili2db.inheritanceTrafo" == "smart2": "smart2Inheritance" = True
"ch.ehi.ili2db.BasketHandling" == "readWrite": "createBasketCol" = True
"ch.ehi.ili2db.StrokeArcs" == "enable": "strokeArcs" = True
"ch.ehi.ili2db.defaultSrsAuthority" : "defaultSrsAuth" = "ch.ehi.ili2db.defaultSrsAuthority"
"ch.ehi.ili2db.StrokedefaultSrsCodeArcs": "defaultSrsCode" = "ch.ehi.ili2db.defaultSrsCode"
"ch.ehi.ili2db.catalogueRefTrafo" == "coalesce": "coalesceCatalogueRef" = True
"ch.ehi.ili2db.createEnumDefs" == "multiTableWithId": "createEnumTabsWithId" = True
"ch.ehi.ili2db.numericCheckConstraints" == "create": "createNumChecks" = True
"ch.ehi.ili2db.uniqueConstraints" == "create": "createUnique" = True
"ch.ehi.ili2db.createForeignKey" == "yes": "createFk" = True
"ch.ehi.ili2db.createForeignKeyIndex" == "yes": "createFkIdx" = True
"ch.ehi.ili2db.multiSurfaceTrafo" == "coalesce": "coalesceMultiSurface" = True
"ch.ehi.ili2db.multiLineTrafo" == "coalesce": "coalesceMultiLine" = True
"ch.ehi.ili2db.multiPointTrafo" == "coalesce": "coalesceMultiPoint" = True
"ch.ehi.ili2db.arrayTrafo" == "coalesce": "coalesceArray" = True
"ch.ehi.ili2db.beautifyEnumDispName" == "underscore": "beautifyEnumDispName" = True
"ch.ehi.sqlgen.createGeomIndex" == "underscore": "createGeomIdx" = True
"ch.ehi.ili2db.createMetaInfo": "createMetaInfo" = True
"ch.ehi.ili2db.multilingualTrafo" == "expand": "expandMultilingual" = True
"ch.ehi.ili2db.createTypeConstraint": "createTypeConstraint" = True
"ch.ehi.ili2db.TidHandling" == "property": "createTidCol" = True

Not set by parsing (not possible)

--iliMetaAttrs (for ini/toml)
--preScript
--postScript
--models

Not parsed but available in ili2db_settings after created by Model Baker

ch.ehi.ili2db.localisedTrafo
ch.ehi.ili2db.geomAttrPerTable (at GeoPackage)
ch.ehi.ili2db.jsonTrafo
ch.ehi.ili2db.maxSqlNameLength
ch.ehi.ili2db.uuidDefaultValue (at PostgreSQL)

Possible settings that are not handled (by Model Baker and with that not parsed as well)

--createEnumColAsItfCode
--createEnumTxtCol
--createSingleEnumTab
--createStdCols
--createTypeDiscriminator
--structWithGenericRef
--disableNameOptimization
--nameLang lang
--maxNameLength length
--oneGeomPerTable
--setupPgExt
--coalesceJson
--expandLocalised
--idSeqMin zahl
--idSeqMax zahl
--nameByTopic
--createTextChecks
--createDateTimeChecks
--createMandatoryChecks

Maybe in future some of them could be used by Model Baker. See #795

Considered with "Disable Constraints" but not really relevant for a topping

--sqlEnableNull
--sqlColsAsText

What needs to be done

It needs to be checked if it's possible to make a (more or less) 1-to-1 map from ili2db_settings to the commands mentioned in the "Possible settings that are not handled (by Modelbaker)". If so all those parameters can be parsed.

BUT still, on every additional parameter the parsing needs to be updated. So it's a little fault prone anyway...

@signedav
Copy link
Member Author

Request Claude if it's possible to provide just the full list of parameters.

@signedav
Copy link
Member Author

signedav commented Jun 5, 2023

Opened this issue claeis/ili2db#516 Claude mentioned ca. 2 days.

Edit: And to match it into our current solution I estimate around 1 day from our side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement usabILItyhub formerly known as InterlisPlus
Projects
None yet
Development

No branches or pull requests

1 participant