feature: use of cache with override feature, export, removing duplicate columns on creating a table
This commit is contained in:
parent
bb7db7ffea
commit
2ffe827063
|
@ -125,7 +125,7 @@ def meta(config) :
|
|||
def create (**_args) :
|
||||
skip = [] if 'skip' not in _args else _args['skip']
|
||||
fields = ([_args['key']] if 'key' in _args else []) + _args['fields']
|
||||
fields = ['_id'] + fields
|
||||
fields = ['_id'] + list(set(fields))
|
||||
table = _args['table']
|
||||
sql = ['CREATE TABLE :table ',"(",",\n".join(["\t".join(["\t",name,"VARCHAR(125)"]) for name in fields]),")"]
|
||||
return " ".join(sql)
|
||||
|
|
|
@ -128,7 +128,7 @@ class CreateSQL(Worker) :
|
|||
# log = {"context":self.name(),"args":{"table":self._info['args']['table'],"sql":self._sql}}
|
||||
log = {"context":self.name(),"args":{"table":sqltable,"sql":self._sql.replace(":table",sqltable)}}
|
||||
try:
|
||||
|
||||
|
||||
|
||||
writer = transport.factory.instance(**self._info)
|
||||
writer.apply(self._sql.replace(":table",sqltable))
|
||||
|
|
|
@ -422,7 +422,13 @@ class Parser (Process):
|
|||
# else:
|
||||
# value[label].append(tmp)
|
||||
|
||||
tmp['_index'] = len(value[label]) -1
|
||||
if '_index' not in tmp :
|
||||
#
|
||||
# In case we asked it to be overriden, then this will not apply
|
||||
# X12 occasionally requires references to other elements in a loop (alas)
|
||||
#
|
||||
tmp['_index'] = len(value[label]) -1
|
||||
|
||||
elif 'field' in _info :
|
||||
|
||||
name = _info['field']
|
||||
|
|
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ import sys
|
|||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
args = {
|
||||
"name":"healthcareio","version":"1.6.3.3",
|
||||
"name":"healthcareio","version":"1.6.3.4",
|
||||
"author":"Vanderbilt University Medical Center",
|
||||
"author_email":"steve.l.nyemba@vumc.org",
|
||||
"include_package_data":True,
|
||||
|
|
Loading…
Reference in New Issue