mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
row names
This commit is contained in:
@@ -42,7 +42,7 @@ export class ClientStatisticsService {
|
|||||||
const selectedRows = await queryRunner.manager.getRepository(ClientStatisticsEntity)
|
const selectedRows = await queryRunner.manager.getRepository(ClientStatisticsEntity)
|
||||||
.createQueryBuilder()
|
.createQueryBuilder()
|
||||||
.setLock('pessimistic_write') // Acquire a write lock
|
.setLock('pessimistic_write') // Acquire a write lock
|
||||||
.where('address = :address AND clientName = :clientName AND sessionId = :sessionId AND time = :time', { address: clientStatistic.address, clientName: clientStatistic.clientName, sessionId: clientStatistic.sessionId, time: clientStatistic.time })
|
.where('address = :address AND "clientName" = :clientName AND "sessionId" = :sessionId AND time = :time', { address: clientStatistic.address, clientName: clientStatistic.clientName, sessionId: clientStatistic.sessionId, time: clientStatistic.time })
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
// Update the rows
|
// Update the rows
|
||||||
@@ -54,7 +54,7 @@ export class ClientStatisticsService {
|
|||||||
shares: () => `"shares" + ${clientStatistic.shares}`,
|
shares: () => `"shares" + ${clientStatistic.shares}`,
|
||||||
acceptedCount: () => `"acceptedCount" + 1`
|
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 })
|
.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();
|
.execute();
|
||||||
} else {
|
} else {
|
||||||
// If no rows were found, insert a new record
|
// If no rows were found, insert a new record
|
||||||
|
|||||||
Reference in New Issue
Block a user