MCPcopy
hub / github.com/andialbrecht/sqlparse / insert_before

Method insert_before

sqlparse/sql.py:337–342  ·  view source on GitHub ↗

Inserts *token* before *where*.

(self, where, token)

Source from the content-addressed store, hash-verified

335 return grp
336
337 def insert_before(self, where, token):
338 """Inserts *token* before *where*."""
339 if not isinstance(where, int):
340 where = self.token_index(where)
341 token.parent = self
342 self.tokens.insert(where, token)
343
344 def insert_after(self, where, token, skip_ws=True):
345 """Inserts *token* after *where*."""

Callers 11

_split_kwdsMethod · 0.80
_split_statementsMethod · 0.80
_process_whereMethod · 0.80
_process_caseMethod · 0.80
_process_valuesMethod · 0.80
_process_parenthesisMethod · 0.80
_process_caseMethod · 0.80
_split_kwdsMethod · 0.80
_processMethod · 0.80

Calls 1

token_indexMethod · 0.95

Tested by

no test coverage detected