Skip to content

The REPLACE sql function in mappings

daghovland edited this page Sep 16, 2014 · 1 revision

Note: Under development, not yet in branch on github

Allowing SQL REPLACE in the source sql brings some issues.

  • A nested combination of replace statements is commonly not injective. This can lead to uri-collisions. Probably this will be up to the mapping editor to make sure this will not be a problem.

  • The tests for not null, added to the mappings by QuestUnfolder.addNOTNULLToMapping, could for clarity and efficiency of the generated sql be modified to only check the column, not the complete replace statement.

  • The replace statement is coded as text and stored together with the ordinary table names in aliasMap and lookupTable. This makes sense, since the ordering of the replace statements is important. The better solution is probably to refactor the lookupTable, and maybe also the aliasMap to take the replace into account.

Clone this wiki locally