This commit is contained in:
2025-11-17 11:12:19 +01:00
parent 5fcfc4dc2c
commit 8eebe3215a
8 changed files with 31 additions and 19 deletions
@@ -129,8 +129,9 @@ export function grabPrimaryRequiredDbSchema({ userId, dbId, dbSlug }: Params) {
// }
// }
console.log(`userSchemaDir not found!`);
console.log(`Coudln't grab Required DB Schema!`);
console.log(`userId`, userId);
console.log(`dbId`, dbId);
return undefined;
}
+7 -4
View File
@@ -1633,6 +1633,11 @@ export type PagePropsType = {
docsPageEditURL?: string | null;
};
export type ResponseQueryObject = {
sql?: string;
params?: string[];
};
export type APIResponseObject<T extends any = any> = {
success: boolean;
payload?: T;
@@ -1642,10 +1647,8 @@ export type APIResponseObject<T extends any = any> = {
payloadThumbnailURL?: string;
error?: any;
msg?: string;
queryObject?: {
sql?: string;
params?: string[];
};
queryObject?: ResponseQueryObject;
countQueryObject?: ResponseQueryObject;
status?: number;
count?: number;
errors?: DSQLErrorObject[];
@@ -44,7 +44,7 @@ export default async function <
})
: undefined;
if (count && countQueryObject) {
if ((count || countOnly) && countQueryObject) {
connQueries.push({
query: countQueryObject.string,
values: countQueryObject.values,
@@ -88,12 +88,16 @@ export default async function <
sql: queryObject?.string,
params: queryObject?.values,
},
countQueryObject: {
sql: countQueryObject?.string,
params: countQueryObject?.values,
},
count: isSuccess
? res[1]?.[0]?.["COUNT(*)"]
? res[1][0]["COUNT(*)"]
: res[0]?.[0]?.["COUNT(*)"]
? res[0][0]["COUNT(*)"]
: undefined
: 0
: undefined,
};
}