MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getFit

Function getFit

eos/db/saveddata/queries.py:207–224  ·  view source on GitHub ↗
(lookfor, eager=None)

Source from the content-addressed store, hash-verified

205
206@cachedQuery(Fit, 1, "lookfor")
207def getFit(lookfor, eager=None):
208 if isinstance(lookfor, int):
209 if eager is None:
210 with sd_lock:
211 fit = saveddata_session.query(Fit).get(lookfor)
212 else:
213 eager = processEager(eager)
214 with sd_lock:
215 fit = saveddata_session.query(Fit).options(*eager).filter(Fit.ID == lookfor).first()
216 else:
217 raise TypeError("Need integer as argument")
218
219 if fit and fit.isInvalid:
220 with sd_lock:
221 removeInvalid([fit])
222 return None
223
224 return fit
225
226
227def getFitsWithShip(shipID, ownerID=None, where=None, eager=None):

Callers 9

exportEftMethod · 0.90
exportDnaMethod · 0.90
exportEsiMethod · 0.90
exportXmlMethod · 0.90
exportMultiBuyMethod · 0.90
exportEfsMethod · 0.90
exportFitStatsMethod · 0.90
generateFullHTMLMethod · 0.90
generateMinimalHTMLMethod · 0.90

Calls 3

processEagerFunction · 0.90
removeInvalidFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected