exposed-jdbc/src/main/kotlin/org/jetbrains/exposed/v1/jdbc/Query.kt [301:327]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override fun iterator(): Iterator { val rs = transaction.execQuery(queryToExecute) val resultIterator = ResultIterator(rs) return if (transaction.db.supportsMultipleResultSets) { resultIterator } else { Iterable { resultIterator }.toList().iterator() } } private inner class ResultIterator(rs: ResultSet) : StatementIterator, ResultRow>(rs) { override val fieldIndex = set.realFields.toSet() .mapIndexed { index, expression -> expression to index } .toMap() init { hasNext = result.next() if (hasNext) trackResultSet(transaction) } override fun createResultRow(): ResultRow = ResultRow.create(JdbcResult(result), fieldIndex) } companion object { private fun trackResultSet(transaction: JdbcTransaction) { val threshold = transaction.db.config.logTooMuchResultSetsThreshold if (threshold > 0 && threshold < transaction.openResultSetsCount) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - exposed-jdbc/src/main/kotlin/org/jetbrains/exposed/v1/jdbc/SetOperations.kt [156:182]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override fun iterator(): Iterator { val rs = transaction.execQuery(queryToExecute) val resultIterator = ResultIterator(rs) return if (transaction.db.supportsMultipleResultSets) { resultIterator } else { Iterable { resultIterator }.toList().iterator() } } private inner class ResultIterator(rs: ResultSet) : StatementIterator, ResultRow>(rs) { override val fieldIndex = set.realFields.toSet() .mapIndexed { index, expression -> expression to index } .toMap() init { hasNext = result.next() if (hasNext) trackResultSet(transaction) } override fun createResultRow(): ResultRow = ResultRow.create(JdbcResult(result), fieldIndex) } companion object { private fun trackResultSet(transaction: JdbcTransaction) { val threshold = transaction.db.config.logTooMuchResultSetsThreshold if (threshold > 0 && threshold < transaction.openResultSetsCount) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -