MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / searchFits

Function searchFits

eos/db/saveddata/queries.py:463–475  ·  view source on GitHub ↗
(nameLike, where=None, eager=None)

Source from the content-addressed store, hash-verified

461
462
463def searchFits(nameLike, where=None, eager=None):
464 if not isinstance(nameLike, str):
465 raise TypeError("Need string as argument")
466 # Prepare our string for request
467 nameLike = "%{0}%".format(sqlizeString(nameLike))
468
469 # Add any extra components to the search to our where clause
470 filter = processWhere(Fit.name.like(nameLike, escape="\\"), where)
471 eager = processEager(eager)
472 with sd_lock:
473 fits = removeInvalid(saveddata_session.query(Fit).options(*eager).filter(filter).limit(100).all())
474
475 return fits
476
477
478def getProjectedFits(fitID):

Callers

nothing calls this directly

Calls 4

processWhereFunction · 0.90
processEagerFunction · 0.90
sqlizeStringFunction · 0.85
removeInvalidFunction · 0.85

Tested by

no test coverage detected