( dialect: BaseDriver, schema: string, table: string, value: Record<string, unknown>, supportReturning: boolean, supportRowId: boolean )
| 61 | } |
| 62 | |
| 63 | export 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 | |
| 79 | export function updateTable( |
| 80 | dialect: BaseDriver, |
no test coverage detected