not finished
This commit is contained in:
parent
c20e37f4e6
commit
b2f6a6c2e0
@ -125,7 +125,16 @@ class MongoDB:
|
|||||||
self.mongoDB['global'].update_one(filter, {"$set": data_label}, upsert=False)
|
self.mongoDB['global'].update_one(filter, {"$set": data_label}, upsert=False)
|
||||||
|
|
||||||
def add_data(self, shotNum, data, date=None, name=None, engine='normal'):
|
def add_data(self, shotNum, data, date=None, name=None, engine='normal'):
|
||||||
pass
|
if not date is None:
|
||||||
|
self.set_date(date)
|
||||||
|
|
||||||
|
if engine == 'normal':
|
||||||
|
self._add_data_normal(shotNum=shotNum, data=data)
|
||||||
|
elif engine == 'xarray':
|
||||||
|
if isinstance(dataSet, type(xr.Dataset())):
|
||||||
|
self._add_data_xarray_dataSet(shotNum=shotNum, data=data, name=name)
|
||||||
|
else:
|
||||||
|
self._add_data_xarray_dataArray(shotNum=shotNum, data=data, name=name)
|
||||||
|
|
||||||
def read_data(self, shotNum, data=None):
|
def read_data(self, shotNum, data=None):
|
||||||
pass
|
pass
|
@ -2088,7 +2088,16 @@
|
|||||||
" self.mongoDB['global'].update_one(filter, {\"$set\": data_label}, upsert=False)\n",
|
" self.mongoDB['global'].update_one(filter, {\"$set\": data_label}, upsert=False)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" def add_data(self, shotNum, data, date=None, name=None, engine='normal'):\n",
|
" def add_data(self, shotNum, data, date=None, name=None, engine='normal'):\n",
|
||||||
" pass\n",
|
" if not date is None:\n",
|
||||||
|
" self.set_date(date)\n",
|
||||||
|
" \n",
|
||||||
|
" if engine == 'normal':\n",
|
||||||
|
" self._add_data_normal(shotNum=shotNum, data=data)\n",
|
||||||
|
" elif engine == 'xarray':\n",
|
||||||
|
" if isinstance(dataSet, type(xr.Dataset())):\n",
|
||||||
|
" self._add_data_xarray_dataSet(shotNum=shotNum, data=data, name=name)\n",
|
||||||
|
" else:\n",
|
||||||
|
" self._add_data_xarray_dataArray(shotNum=shotNum, data=data, name=name)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" def read_data(self, shotNum, data=None):\n",
|
" def read_data(self, shotNum, data=None):\n",
|
||||||
" pass\n",
|
" pass\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user