mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 02:27:39 +00:00
feat: resolved some queries giving any[] on db instance modification for replication
This commit is contained in:
@@ -13,8 +13,12 @@ export const initDbConnection = ({
|
|||||||
dbRootCert?: string;
|
dbRootCert?: string;
|
||||||
}[];
|
}[];
|
||||||
}) => {
|
}) => {
|
||||||
let db: Knex;
|
// akhilmhdh: the default Knex is knex.Knex<any, any[]>. but when assigned with knex({<config>}) the value is knex.Knex<any, unknown[]>
|
||||||
let readReplicaDbs: Knex[];
|
// this was causing issue with files like `snapshot-dal` `findRecursivelySnapshots` this i am explicitly putting the any and unknown[]
|
||||||
|
// eslint-disable-next-line
|
||||||
|
let db: Knex<any, unknown[]>;
|
||||||
|
// eslint-disable-next-line
|
||||||
|
let readReplicaDbs: Knex<any, unknown[]>[];
|
||||||
// @ts-expect-error the querybuilder type is expected but our intension is to return a knex instance
|
// @ts-expect-error the querybuilder type is expected but our intension is to return a knex instance
|
||||||
knex.QueryBuilder.extend("primaryNode", () => {
|
knex.QueryBuilder.extend("primaryNode", () => {
|
||||||
return db;
|
return db;
|
||||||
|
|||||||
Reference in New Issue
Block a user