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

Method token_index

sqlparse/sql.py:302–305  ·  view source on GitHub ↗

Return list index of token.

(self, token, start=0)

Source from the content-addressed store, hash-verified

300 return self._token_matching(matcher, idx, reverse=_reverse)
301
302 def token_index(self, token, start=0):
303 """Return list index of token."""
304 start = start if isinstance(start, int) else self.token_index(start)
305 return start + self.tokens[start:].index(token)
306
307 def group_tokens(self, grp_cls, start, end, include_end=True,
308 extend=False):

Callers 6

insert_beforeMethod · 0.95
insert_afterMethod · 0.95
get_typeMethod · 0.80
group_whereFunction · 0.80
_process_defaultMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected