(args ...vector.Any)
| 104 | } |
| 105 | |
| 106 | func (s *Strftime) Call(args ...vector.Any) vector.Any { |
| 107 | if vec, ok := expr.CheckForNullThenError(args); ok { |
| 108 | return vec |
| 109 | } |
| 110 | args = underAll(args) |
| 111 | formatVec, timeVec := args[0], args[1] |
| 112 | if formatVec.Type().ID() != super.IDString { |
| 113 | return vector.NewWrappedError(s.sctx, "strftime: string value required for format arg", formatVec) |
| 114 | } |
| 115 | if timeVec.Type().ID() != super.IDTime { |
| 116 | return vector.NewWrappedError(s.sctx, "strftime: time value required for time arg", args[1]) |
| 117 | } |
| 118 | if _, ok := formatVec.(*vector.Const); ok { |
| 119 | return s.fastPath(formatVec, timeVec) |
| 120 | } |
| 121 | return s.slowPath(formatVec, timeVec) |
| 122 | } |
| 123 | |
| 124 | func (s *Strftime) fastPath(fvec vector.Any, tvec vector.Any) vector.Any { |
| 125 | format := vector.StringValue(fvec, 0) |
nothing calls this directly
no test coverage detected