code: func (cfg *Config) CheckAndSetDefaults() error {
  	if cfg.Path == "" && !cfg.Memory {
  		return trace.BadParameter("specify directory path to the database using 'path' parameter")
  	}
  	if cfg.BufferSize == 0 {
  		cfg.BufferSize = backend.DefaultBufferSize
  	}
  	if cfg.PollStreamPeriod == 0 {
  		cfg.PollStreamPeriod = backend.DefaultPollStreamPeriod
  	}
  	if cfg.Clock == nil {
  		cfg.Clock = clockwork.NewRealClock()
  	}
  	if cfg.Sync == "" {
  		cfg.Sync = syncOFF
  	}
  	if cfg.BusyTimeout == 0 {
  		cfg.BusyTimeout = busyTimeout
  	}
  	if cfg.MemoryName == "" {
  		cfg.MemoryName = defaultDBFile
  	}
  	return nil
  }
docs: // CheckAndSetDefaults is a helper returns an error if the supplied configuration
  // is not enough to connect to sqlite