Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other interval types #18

Open
pyramation opened this issue Oct 27, 2020 · 1 comment
Open

other interval types #18

pyramation opened this issue Oct 27, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@pyramation
Copy link
Collaborator

https://github.com/pyramation/pgtree/blob/master/nodes/intervals.go#L39-L68

@pyramation
Copy link
Collaborator Author

func (i IntervalModType) String() string {
	switch i {
	case Month:
		return "month"
	case Year:
		return "year"
	case Day:
		return "day"
	case Hour:
		return "hour"
	case Minute:
		return "minute"
	case Second:
		return "second"
	case Year | Month:
		return "year to month"
	case Hour | Day:
		return "day to hour"
	case Day | Hour | Minute:
		return "day to minute"
	case Day | Hour | Minute | Second:
		return "day to second"
	case Hour | Minute:
		return "hour to minute"
	case Hour | Minute | Second:
		return "hour to second"
	case Minute | Second:
		return "minute to second"
	}

	return ""
}

@pyramation pyramation added the enhancement New feature or request label Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant