MCPcopy Create free account
hub / github.com/blastrain/vitess-sqlparser / StrToDuration

Function StrToDuration

tidbparser/dependency/types/convert.go:173–193  ·  view source on GitHub ↗

StrToDuration converts str to Duration. It returns Duration in normal case, and returns Time when str is in datetime format. when isDuration is true, the d is returned, when it is false, the t is returned. See https://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html.

(sc *stmtctx.StatementContext, str string, fsp int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

StrToDateTimeFunction · 0.85
ParseDurationFunction · 0.85
HandleTruncateMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…