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

Method get_typecast

sqlparse/sql.py:454–458  ·  view source on GitHub ↗

Returns the typecast or ``None`` of this object as a string.

(self)

Source from the content-addressed store, hash-verified

452 return token is not None
453
454 def get_typecast(self):
455 """Returns the typecast or ``None`` of this object as a string."""
456 midx, marker = self.token_next_by(m=(T.Punctuation, '::'))
457 nidx, next_ = self.token_next(midx, skip_ws=False)
458 return next_.value if next_ else None
459
460 def get_ordering(self):
461 """Returns the ordering or ``None`` as uppercase string."""

Callers 1

test_grouping_typecastFunction · 0.80

Calls 2

token_next_byMethod · 0.80
token_nextMethod · 0.80

Tested by 1

test_grouping_typecastFunction · 0.64