Skip to content

Commit ee6b859

Browse files
author
Stephanie Reeder
committed
add lists to all id and code fields
1 parent b1cc22b commit ee6b859

File tree

2 files changed

+121
-187
lines changed

2 files changed

+121
-187
lines changed

odm2api/ODM2/services/createService.py

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ def __init__(self, session):
1717
# Annotations
1818
# ################################################################################
1919

20+
def create(self, values):
21+
if len(values)>1:
22+
self._session.add_all(values)
23+
else:
24+
self._session.add(values)
25+
self._session.commit()
26+
2027
def createVariable(self, var):
2128
self._session.add(var)
2229
self._session.commit()
@@ -92,7 +99,8 @@ def createSimulation(self, simulation):
9299

93100
def createTimeSeriesResultValues(self, datavalues):
94101
try:
95-
102+
tablename = TimeSeriesResultValues.__tablename__
103+
print "I am TS saving name the table name"+ tablename
96104
datavalues.to_sql(name="TimeSeriesResultValues",
97105
schema=TimeSeriesResultValues.__table_args__['schema'],
98106
if_exists='append',
@@ -106,10 +114,6 @@ def createTimeSeriesResultValues(self, datavalues):
106114
print e
107115
return None
108116

109-
# ################################################################################
110-
# CV
111-
# ################################################################################
112-
113117

114118

115119

@@ -448,53 +452,7 @@ def createTimeSeriesResultValues(self, datavalues):
448452
#
449453
# return result
450454
#
451-
#
452-
# # ################################################################################
453-
# # Data Quality
454-
# # ################################################################################
455-
#
456-
#
457-
#
458-
# # ################################################################################
459-
# # Equipment
460-
# # ################################################################################
461-
#
462-
#
463-
#
464-
#
465-
# # ################################################################################
466-
# # ExtensionProperties
467-
# # ################################################################################
468-
#
469-
#
470-
#
471-
#
472-
#
473-
# # ################################################################################
474-
# # External Identifiers
475-
# # ################################################################################
476-
#
477-
#
478-
#
479-
#
480-
# # ################################################################################
481-
# # Lab Analyses
482-
# # ################################################################################
483-
#
484-
#
485-
#
486-
#
487-
# # ################################################################################
488-
# # Provenance
489-
# # ################################################################################
490-
#
491-
#
492-
#
493-
#
494-
# # ################################################################################
495-
# # Results
496-
# # ################################################################################
497-
#
455+
498456
#
499457
#
500458
# def createTimeSeriesResult(self, result, aggregationstatistic, xloc=None, xloc_unitid=None, yloc=None,

0 commit comments

Comments
 (0)