github.com/altipla-consulting/ravendb-go-client@v0.1.3/for_tests.go (about)

     1  // +build for_tests
     2  
     3  package ravendb
     4  
     5  // this file exposes functionality that is only meant to be used
     6  // in tests. This code is only compiled when "-tags for_tests"
     7  // option is used
     8  
     9  func (c *DocumentConventions) GetCollectionName(entityOrType interface{}) string {
    10  	return c.getCollectionName(entityOrType)
    11  }
    12  
    13  func (s *DocumentSession) ForTestsSaveChangesGetCommands() ([]ICommandData, error) {
    14  	result, err := s.prepareForSaveChanges()
    15  	if err != nil {
    16  		return nil, err
    17  	}
    18  	res := append(result.sessionCommands, result.deferredCommands...)
    19  	return res, nil
    20  }