Skip to content

Commit

Permalink
Add comment to explain use of query values
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-mohr committed Mar 26, 2021
1 parent 9290dfe commit 2fa49af
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,7 @@ gene.id = consequence_has_gene.gene_id INNER JOIN consequence on consequence_has
sql.withBatch("insert INTO gene (symbol, name, biotype, chr, start, end, synonyms, geneid, description, strand, version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE symbol=?, name=?, biotype=?, chr=?, start=?, end=?, synonyms=?, geneid=?, description=?, strand=?, version=?") {
BatchingPreparedStatementWrapper ps ->
genes.each { gene ->
// we have to specify the values twice since we need them for the insert and "on duplicate" part of the sql query
ps.addBatch([gene.symbol, gene.name, gene.bioType, gene.chromosome, gene.geneStart,
gene.geneEnd, gene.synonyms[0], gene.geneId, gene.description, gene.strand, gene.version,
gene.symbol, gene.name, gene.bioType, gene.chromosome, gene.geneStart,
Expand Down

0 comments on commit 2fa49af

Please sign in to comment.