Skip to content

Commit

Permalink
revert unrelated change
Browse files Browse the repository at this point in the history
  • Loading branch information
nkovacsx committed Oct 13, 2023
1 parent 00688c8 commit 39ec1e7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ abstract class AbstractUtxoQueryProvider : UtxoQueryProvider {
val UNVERIFIED = TransactionStatus.UNVERIFIED.value
}

override val findTransactionIdsAndStatuses: String
get() = """
SELECT id, status
FROM {h-schema}utxo_transaction
WHERE id IN (:transactionIds)"""
.trimIndent()

override val findTransactionPrivacySalt: String
get() = """
SELECT privacy_salt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,4 @@ interface UtxoQueryProvider {
* @property persistSignedGroupParameters SQL text for [UtxoRepositoryImpl.persistSignedGroupParameters].
*/
val persistSignedGroupParameters: String

/**
* @property findTransactionIdsAndStatuses SQL text for [UtxoRepositoryImpl.findTransactionIdsAndStatuses].
*/
val findTransactionIdsAndStatuses: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ class UtxoRepositoryImpl @Activate constructor(
entityManager: EntityManager,
transactionIds: List<String>
): Map<SecureHash, String> {
return entityManager.createNativeQuery(queryProvider.findTransactionIdsAndStatuses, Tuple::class.java)
return entityManager.createNativeQuery(
"""
SELECT id, status
FROM {h-schema}utxo_transaction
WHERE id IN (:transactionIds)""",
Tuple::class.java
)
.setParameter("transactionIds", transactionIds)
.resultListAsTuples()
.associate { r -> parseSecureHash(r.get(0) as String) to r.get(1) as String }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ data class UtxoTransactionEntity(
if (!privacySalt.contentEquals(other.privacySalt)) return false
if (accountId != other.accountId) return false
if (created != other.created) return false
if (status != other.status) return false
if (updated != other.updated) return false

return true
}
Expand All @@ -59,8 +57,6 @@ data class UtxoTransactionEntity(
result = 31 * result + privacySalt.contentHashCode()
result = 31 * result + accountId.hashCode()
result = 31 * result + created.hashCode()
result = 31 * result + status.hashCode()
result = 31 * result + updated.hashCode()
return result
}
}

0 comments on commit 39ec1e7

Please sign in to comment.