MCPcopy Create free account
hub / github.com/outerbase/studio / insertInto

Function insertInto

src/drivers/query-builder.ts:63–77  ·  view source on GitHub ↗
(
  dialect: BaseDriver,
  schema: string,
  table: string,
  value: Record<string, unknown>,
  supportReturning: boolean,
  supportRowId: boolean
)

Source from the content-addressed store, hash-verified

61}
62
63export function insertInto(
64 dialect: BaseDriver,
65 schema: string,
66 table: string,
67 value: Record<string, unknown>,
68 supportReturning: boolean,
69 supportRowId: boolean
70) {
71 return [
72 "INSERT INTO",
73 `${dialect.escapeId(schema)}.${dialect.escapeId(table)}`,
74 generateInsertValue(dialect, value),
75 supportReturning ? `RETURNING ${supportRowId ? "rowid, " : ""}*` : "",
76 ].join(" ");
77}
78
79export function updateTable(
80 dialect: BaseDriver,

Callers 1

updateTableDataFunction · 0.90

Calls 2

generateInsertValueFunction · 0.85
escapeIdMethod · 0.45

Tested by

no test coverage detected