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

Function sqlizeString

eos/db/saveddata/queries.py:142–147  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

140
141
142def sqlizeString(line):
143 # Escape backslashes first, as they will be as escape symbol in queries
144 # Then escape percent and underscore signs
145 # Finally, replace generic wildcards with sql-style wildcards
146 line = line.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_").replace("*", "%")
147 return line
148
149
150@cachedQuery(User, 1, "lookfor")

Callers 1

searchFitsFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected