mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
defer entity creation
This commit is contained in:
@@ -26,6 +26,9 @@ export class ClientStatisticsEntity extends TrackedEntity {
|
||||
@Column({ type: 'real' })
|
||||
shares: number;
|
||||
|
||||
@Column({ default: 0, type: 'integer' })
|
||||
acceptedCount: number;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ export class ClientStatisticsService {
|
||||
const res1 = await this.clientStatisticsRepository.createQueryBuilder()
|
||||
.update(ClientStatisticsEntity)
|
||||
.set({
|
||||
shares: () => `"shares" + ${clientStatistic.shares}` // Use the actual value of shares here
|
||||
shares: () => `"shares" + ${clientStatistic.shares}`, // Use the actual value of shares here
|
||||
acceptedCount: () => `"acceptedCount" + 1`
|
||||
})
|
||||
.where('address = :address AND clientName = :clientName AND sessionId = :sessionId AND time = :time', { address: clientStatistic.address, clientName: clientStatistic.clientName, sessionId: clientStatistic.sessionId, time: clientStatistic.time })
|
||||
.execute();
|
||||
|
||||
Reference in New Issue
Block a user