func NewCollection(opts ...Options) *Collection {
	options := Options{
		Capacity: 1024,
		Vacuum:   1 * time.Second,
		Writer:   nil,
	}
	for _, o := range opts {
		if o.Capacity > 0 {
			options.Capacity = o.Capacity
		}
		if o.Vacuum > 0 {
			options.Vacuum = o.Vacuum
		}
		if o.Writer != nil {
			options.Writer = o.Writer
		}
	}
	ctx, cancel := context.WithCancel(context.Background())
	store := &Collection{
		cols:   makeColumns(8),
		txns:   newTxnPool(),
		size:   options.Capacity,
		slock:  new(smutex.SMutex128),
		fill:   make(bitmap.Bitmap, 0, options.Capacity>>6),
		writer: options.Writer,
		cancel: cancel,
	}
	store.CreateColumn(expireColumn, ForInt64())
	go store.vacuum(ctx, options.Vacuum)
	return store
}
NewCollection creates a new columnar collection.
package column
import (
	"context"
	"fmt"
	"math/bits"
	"reflect"
	"sync"
	"sync/atomic"
	"time"
	"github.com/kelindar/bitmap"
	"github.com/kelindar/column/commit"
	"github.com/kelindar/smutex"
)
type Object = map[string]interface{}
const (
	expireColumn = "expire"
	rowColumn    = "row"
)
type Collection struct {
	count  uint64              
	txns   *txnPool            
	lock   sync.RWMutex        
	slock  *smutex.SMutex128   
	cols   columns             
	fill   bitmap.Bitmap       
	size   int                 
	writer commit.Writer       
	pk     *columnKey          
	cancel context.CancelFunc  
}
type Options struct {
	Capacity int            
	Writer   commit.Writer  
	Vacuum   time.Duration  
}