Skip to content

Commit

Permalink
missing merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
siddheshraze committed Dec 24, 2024
1 parent 72f70cf commit e5d14ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
1 change: 1 addition & 0 deletions frontend/components/datagrids/measurementscommons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export default function MeasurementsCommons(props: Readonly<MeasurementsCommonsP
snackbar,
setSnackbar,
refresh,
setRefresh,
paginationModel,
setPaginationModel,
isNewRowAdded,
Expand Down
20 changes: 0 additions & 20 deletions frontend/config/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,9 @@ export function createSelectQuery<Result>(schema: string, tableName: string, whe
.map(key => `\`${key}\` = ?`) // Escaping column names with backticks
.join(' AND ');

<<<<<<< HEAD
return `SELECT * FROM \`${schema}\`.\`${tableName}\` WHERE ${whereConditions} ${limiter ? `LIMIT ${limiter}` : ``}`;
=======
return `SELECT *
FROM \`${schema}\`.\`${tableName}\`
WHERE ${whereConditions} ${limiter ? `LIMIT ${limiter}` : ``}`;
>>>>>>> development-hotfixes
}

export function createInsertOrUpdateQuery<Result>(schema: string, tableName: string, data: Partial<Result>): string {
Expand Down Expand Up @@ -180,11 +176,6 @@ export async function handleUpsert<Result>(
console.log('query: ', query);
console.log('values: ', Object.values(data));
const result = await connectionManager.executeQuery(query, Object.values(data));
<<<<<<< HEAD
console.log('result: ', result);

=======
>>>>>>> development-hotfixes
id = result.insertId;

if (id === 0) {
Expand Down Expand Up @@ -224,11 +215,7 @@ export async function handleUpsert<Result>(
console.log('values: ', Object.values(values));

const searchResult = await connectionManager.executeQuery(findExistingQuery, values);
<<<<<<< HEAD
console.log('search result: ', searchResult);
=======
console.log('find existing query search result: ', searchResult);
>>>>>>> development-hotfixes

if (searchResult.length > 0) {
id = searchResult[0][key as keyof Result] as unknown as number;
Expand All @@ -241,15 +228,8 @@ export async function handleUpsert<Result>(

return { id, operation: 'inserted' };
} catch (e: any) {
<<<<<<< HEAD
console.log('error in handleUpsert: ', e.message);
process.exit(0);
createError(e.message, e);
=======
console.error('Error in handleUpsert:', e.message, 'Stack:', e.stack);
process.exit(0);
throw createError(e.message, e);
>>>>>>> development-hotfixes
}
}

Expand Down

0 comments on commit e5d14ca

Please sign in to comment.