NewBitMapStructure returns a new BitMapStructure It will return a nil BitMapStructure if the database cannot be opened or the database cannot be created The database will be created if it does not exist
(options config.Options)
| 19 | // or the database cannot be created |
| 20 | // The database will be created if it does not exist |
| 21 | func NewBitMapStructure(options config.Options) (*BitMapStructure, error) { |
| 22 | db, err := engine.NewDB(options) |
| 23 | if err != nil { |
| 24 | return nil, err |
| 25 | } |
| 26 | return &BitMapStructure{db: db}, nil |
| 27 | } |
| 28 | |
| 29 | // SetBit Set the bit at the specified offset in the bitmap to the specified value |
| 30 | // If the key does not exist, it will be created |