// Scan is the Scanner interface implementation
Scan is the Scanner interface implementation
// Scan is the Scanner interface implementation
func (ts *Timestamp) Scan(value interface{}) error {
	switch v := value.(type) {
	case time.Time:
		ts.Time = v
		return nil
	case string:
		t, err := time.Parse(StdTimestampFmt, v)
		if err != nil {
			return err
		}
		ts.Time = t
		return nil
	case []byte:
		t, err := time.Parse(StdTimestampFmt, string(v))
		if err != nil {
			return err
		}
		ts.Time = t
		return nil
	default:
		return errInvalidType
	}
}
func ( ts * Timestamp ) Scan ( value interface { } ) error { switch v := value . ( type ) { case time . Time : ts . Time = v return nil case string : t , err := time . Parse ( StdTimestampFmt , v ) if err != nil { return err } ts . Time = t return nil case [ ] byte : t , err := time . Parse ( StdTimestampFmt , string ( v ) ) if err != nil { return err } ts . Time = t return nil default : return errInvalidType } }
Scan is the Scanner interface implementation
Scan is the Scanner interface implementation