Skip to content

v1.0.7

Compare
Choose a tag to compare
@jiangz222 jiangz222 released this 05 Mar 06:53
· 21 commits to master since this release
7a07ca4
  • Fix #226
  • Fix #212 , support options for Database()
  • Fix #225, support whole index options for Index opetions like Createindex() And EnsureIndex()
    Notes: from this version, use UniqueBackgroundSparse and ExpireAfterSeconds in options.IndexOptions instead of IndexModel
type IndexModel struct {
	Key []string // Index key fields; prefix name with dash (-) for descending order
	*options.IndexOptions
}

example:

	indexOpts := officialOpts.Index()
	indexOpts.SetUnique(true).SetExpireAfterSeconds(expireS)
	ast.NoError(cli.CreateOneIndex(context.Background(), options.IndexModel{Key: unique, IndexOptions: indexOpts}))