feat: switched read db operations to replica nodes

This commit is contained in:
=
2024-06-25 22:50:17 +05:30
parent 259c01c110
commit c13c37fc77
41 changed files with 162 additions and 113 deletions
@@ -14,7 +14,8 @@ export const certificateDALFactory = (db: TDbClient) => {
count: string;
}
const count = await db(TableName.Certificate)
const count = await db
.replicaNode()(TableName.Certificate)
.join(TableName.CertificateAuthority, `${TableName.Certificate}.caId`, `${TableName.CertificateAuthority}.id`)
.join(TableName.Project, `${TableName.CertificateAuthority}.projectId`, `${TableName.Project}.id`)
.where(`${TableName.Project}.id`, projectId)