func createPerformers(pqb models.PerformerReaderWriter, n int, o int) error {
	const namePlain = "Name"
	const nameNoCase = "NaMe"

	name := namePlain

	for i := 0; i < n+o; i++ {
		index := i

		if i >= n { // i<n tags get normal names
			name = nameNoCase       // i>=n performers get dup names if case is not checked
			index = n + o - (i + 1) // for the name to be the same the number (index) must be the same also
		} // so count backwards to 0 as needed
		// performers [ i ] and [ n + o - i - 1  ] should have similar names with only the Name!=NaMe part different

		performer := models.Performer{
			Name:     sql.NullString{String: getPerformerStringValue(index, name), Valid: true},
			Checksum: getPerformerStringValue(i, checksumField),
			URL:      getPerformerNullStringValue(i, urlField),
			Favorite: sql.NullBool{Bool: getPerformerBoolValue(i), Valid: true},
			Birthdate: models.SQLiteDate{
				String: getPerformerBirthdate(i),
				Valid:  true,
			},
			DeathDate:     getPerformerDeathDate(i),
			Details:       sql.NullString{String: getPerformerStringValue(i, "Details"), Valid: true},
			Ethnicity:     sql.NullString{String: getPerformerStringValue(i, "Ethnicity"), Valid: true},
			Rating:        getRating(i),
			IgnoreAutoTag: getIgnoreAutoTag(i),
		}

		careerLength := getPerformerCareerLength(i)
		if careerLength != nil {
			performer.CareerLength = models.NullString(*careerLength)
		}

		created, err := pqb.Create(performer)

		if err != nil {
			return fmt.Errorf("Error creating performer %v+: %s", performer, err.Error())
		}

		performerIDs = append(performerIDs, created.ID)
		performerNames = append(performerNames, created.Name.String)
	}

	return nil
}
// createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
// createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
func createPerformers(pqb models.PerformerReaderWriter, n int, o int) error {
	const namePlain = "Name"
	const nameNoCase = "NaMe"
	name := namePlain
	for i := 0; i < n+o; i++ {
		index := i
		if i >= n { 
			name = nameNoCase       
			index = n + o - (i + 1) 
		} 
		performer := models.Performer{
			Name:     sql.NullString{String: getPerformerStringValue(index, name), Valid: true},
			Checksum: getPerformerStringValue(i, checksumField),
			URL:      getPerformerNullStringValue(i, urlField),
			Favorite: sql.NullBool{Bool: getPerformerBoolValue(i), Valid: true},
			Birthdate: models.SQLiteDate{
				String: getPerformerBirthdate(i),
				Valid:  true,
			},
			DeathDate:     getPerformerDeathDate(i),
			Details:       sql.NullString{String: getPerformerStringValue(i, "Details"), Valid: true},
			Ethnicity:     sql.NullString{String: getPerformerStringValue(i, "Ethnicity"), Valid: true},
			Rating:        getRating(i),
			IgnoreAutoTag: getIgnoreAutoTag(i),
		}
		careerLength := getPerformerCareerLength(i)
		if careerLength != nil {
			performer.CareerLength = models.NullString(*careerLength)
		}
		created, err := pqb.Create(performer)
		if err != nil {
			return fmt.Errorf("Error creating performer %v+: %s", performer, err.Error())
		}
		performerIDs = append(performerIDs, created.ID)
		performerNames = append(performerNames, created.Name.String)
	}
	return nil
}
func createPerformers ( pqb models . PerformerReaderWriter , n int , o int ) error { const namePlain = " " const nameNoCase = " " name := namePlain for i := 0 ; i < n + o ; i ++ { index := i if i >= n { name = nameNoCase index = n + o - ( i + 1 ) } performer := models . Performer { Name : sql . NullString { String : getPerformerStringValue ( index , name ) , Valid : true } , Checksum : getPerformerStringValue ( i , checksumField ) , URL : getPerformerNullStringValue ( i , urlField ) , Favorite : sql . NullBool { Bool : getPerformerBoolValue ( i ) , Valid : true } , Birthdate : models . SQLiteDate { String : getPerformerBirthdate ( i ) , Valid : true , } , DeathDate : getPerformerDeathDate ( i ) , Details : sql . NullString { String : getPerformerStringValue ( i , " " ) , Valid : true } , Ethnicity : sql . NullString { String : getPerformerStringValue ( i , " " ) , Valid : true } , Rating : getRating ( i ) , IgnoreAutoTag : getIgnoreAutoTag ( i ) , } careerLength := getPerformerCareerLength ( i ) if careerLength != nil { performer . CareerLength = models . NullString ( * careerLength ) } created , err := pqb . Create ( performer ) if err != nil { return fmt . Errorf ( " " , performer , err . Error ( ) ) } performerIDs = append ( performerIDs , created . ID ) performerNames = append ( performerNames , created . Name . String ) } return nil }
createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
createPerformers creates n performers with plain Name and o performers with camel cased NaMe included
// i<n tags get normal names // i>=n performers get dup names if case is not checked // for the name to be the same the number (index) must be the same also // so count backwards to 0 as needed // performers [ i ] and [ n + o - i - 1  ] should have similar names with only the Name!=NaMe part different