MCPcopy Create free account
hub / github.com/bytebase/bytebase / generateSimpleDeleteStatement

Function generateSimpleDeleteStatement

frontend/src/utils/v1/sql.ts:371–383  ·  view source on GitHub ↗
(
  engine: Engine,
  schema: string,
  table: string
)

Source from the content-addressed store, hash-verified

369};
370
371export const generateSimpleDeleteStatement = (
372 engine: Engine,
373 schema: string,
374 table: string
375) => {
376 if (engine === Engine.MONGODB) {
377 return `db["${escapeMongoDBCollectionName(table)}"].deleteOne({ /* query */ });`;
378 }
379
380 const schemaAndTable = generateSchemaAndTableNameInSQL(engine, schema, table);
381
382 return `DELETE FROM ${schemaAndTable} WHERE 1=2 /* your condition here */;`;
383};
384
385export const compareQueryRowValues = (
386 type: string,

Callers 1

useSchemaPaneContextMenuFunction · 0.90

Calls 2

Tested by

no test coverage detected