Skip to content

Commit

Permalink
[api] Add import/export Tid (optional) parameter to make ili2db use t…
Browse files Browse the repository at this point in the history
…_ili_tid as id when importing/exporting XTFs
  • Loading branch information
gacarrillor committed Apr 14, 2020
1 parent 64a52f0 commit af3dacd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions QgisModelBaker/libili2db/ili2dbconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def __init__(self):
self.xtffile = ''
self.iliexportmodels = ''
self.disable_validation = False
self.with_exporttid = False
self.db_ili_version = None

def to_ili2db_args(self, extra_args=[], with_action=True):
Expand All @@ -154,6 +155,9 @@ def to_ili2db_args(self, extra_args=[], with_action=True):
if self.disable_validation:
args += ["--disableValidation"]

if self.with_exporttid:
args += ["--exportTid"]

if self.iliexportmodels:
args += ["--exportModels", self.iliexportmodels]

Expand Down Expand Up @@ -243,6 +247,7 @@ def __init__(self):
self.xtffile = ''
self.delete_data = False
self.disable_validation = False
self.with_importtid = False

def to_ili2db_args(self, extra_args=[], with_action=True):
args = list()
Expand All @@ -259,6 +264,9 @@ def to_ili2db_args(self, extra_args=[], with_action=True):
if self.delete_data:
args += ["--deleteData"]

if self.with_importtid:
args += ["--importTid"]

args += SchemaImportConfiguration.to_ili2db_args(self, extra_args=extra_args, with_action=False)

args += [self.xtffile]
Expand Down

0 comments on commit af3dacd

Please sign in to comment.