func ParseColumnValues()

in dao/util.go [34:67]


func ParseColumnValues(value interface{}) interface{} {

	switch v := value.(type) {
	case *sql.NullInt32:
		if v.Valid {
			return v.Int32
		}

	case *sql.NullInt64:
		if v.Valid {
			return v.Int64
		}
	case *sql.NullFloat64:
		if v.Valid {
			return v.Float64
		}
	case *sql.NullBool:
		if v.Valid {
			return v.Bool
		}
	case *sql.NullString:
		if v.Valid {
			return v.String
		}
	case *sql.NullTime:
		if v.Valid {
			return v.Time
		}
	default:
		return nil
	}

	return nil
}