Remove comments
This commit is contained in:
@ -22,7 +22,6 @@ func (v *VoterModel) InsertMultiple(identities []string, electionID int) ([]int,
|
||||
}
|
||||
defer tx.Rollback()
|
||||
|
||||
// Prepare the statement once to reuse
|
||||
stmt, err := tx.Prepare(`
|
||||
INSERT INTO voters (identity, election_id)
|
||||
VALUES (?, ?)`)
|
||||
@ -31,10 +30,8 @@ func (v *VoterModel) InsertMultiple(identities []string, electionID int) ([]int,
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
// Store all voter IDs
|
||||
voterIDs := make([]int, 0, len(identities))
|
||||
|
||||
// Execute statement for each identity
|
||||
for _, identity := range identities {
|
||||
result, err := stmt.Exec(identity, electionID)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user