code: func (s *TableSchema) Validate() error {
  	if s.Name == "" {
  		return fmt.Errorf("missing table name")
  	}
  
  	if len(s.Indexes) == 0 {
  		return fmt.Errorf("missing table indexes for '%s'", s.Name)
  	}
  
  	if _, ok := s.Indexes["id"]; !ok {
  		return fmt.Errorf("must have id index")
  	}
  
  	if !s.Indexes["id"].Unique {
  		return fmt.Errorf("id index must be unique")
  	}
  
  	if _, ok := s.Indexes["id"].Indexer.(SingleIndexer); !ok {
  		return fmt.Errorf("id index must be a SingleIndexer")
  	}
  
  	for name, index := range s.Indexes {
  		if name != index.Name {
  			return fmt.Errorf("index name mis-match for '%s'", name)
  		}
  
  		if err := index.Validate(); err != nil {
  			return fmt.Errorf("index %q: %s", name, err)
  		}
  	}
  
  	return nil
  }
docs: // Validate is used to validate the table schema