(nameLike, where=None, eager=None)
| 461 | |
| 462 | |
| 463 | def 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 | |
| 478 | def getProjectedFits(fitID): |
nothing calls this directly
no test coverage detected