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

Unique Constraint Support #7

Merged
merged 3 commits into from Feb 19, 2019
Merged

Unique Constraint Support #7

merged 3 commits into from Feb 19, 2019

Conversation

timshannon
Copy link
Owner

No description provided.

catch up dev branch with master
@timshannon timshannon merged commit 46e5da2 into master Feb 19, 2019
@timshannon timshannon mentioned this pull request Feb 19, 2019
```Go
type Person struct {
	Name string
	Division string `badgerhold:"index"`
}

// alternate struct tag if you wish to specify the index name
type Person struct {
	Name string
	Division string `badgerholdIndex:"IdxDivision"`
}

```

```Go
type Employee struct {
	ID string `badgerhold:"key"`
	FirstName string
	LastName string
	Division string
	Hired time.Time
}

// old struct tag, currenty still supported but may be deprecated in the future
type Employee struct {
	ID string `badgerholdKey`
	FirstName string
	LastName string
	Division string
	Hired time.Time
}
```
FerociousBite pushed a commit to ferocious-space/badgerhold that referenced this pull request Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant