{"record":{"id":"594a417cc6fa6e49","repo":"remix-run/remix","slug":"unsupported-operation-kind-594a41","errorCode":null,"errorMessage":"Unsupported operation kind","messagePattern":"Unsupported operation kind","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/data-table-sqlite/src/lib/sql-compiler.ts","lineNumber":120,"sourceCode":"    }\n  }\n\n  if (operation.kind === 'delete') {\n    return {\n      text:\n        'delete from ' +\n        quotePath(getTableName(operation.table)) +\n        compileWhereClause(operation.where, context) +\n        compileReturningClause(operation.returning),\n      values: context.values,\n    }\n  }\n\n  if (operation.kind === 'upsert') {\n    return compileUpsertOperation(operation, context)\n  }\n\n  throw new Error('Unsupported operation kind')\n}\n\nfunction compileInsertOperation(\n  table: OperationTable,\n  values: Record<string, unknown>,\n  returning: '*' | string[] | undefined,\n  context: CompileContext,\n): SqlStatement {\n  let columns = Object.keys(values)\n\n  if (columns.length === 0) {\n    return {\n      text:\n        'insert into ' +\n        quotePath(getTableName(table)) +\n        ' default values' +\n        compileReturningClause(returning),\n      values: context.values,","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/data-table-sqlite/src/lib/sql-compiler.ts#L102-L138","documentation":"The SQLite SQL compiler only knows how to compile a fixed set of operation kinds (select, insert, update, upsert, delete, etc.). When compileSqliteOperation receives an operation whose kind is not in that set, it throws this error. It indicates either an unsupported operation for SQLite or a version mismatch between the data-table core and the SQLite compiler.","triggerScenarios":"Passing a query operation object with a kind the SQLite compiler doesn't implement (e.g. a new/Postgres-only operation kind) into db.execute() on the SQLite driver; mixing a newer data-table core with an older data-table-sqlite compiler.","commonSituations":"Version skew after upgrading one data-table package but not the other; hand-constructed operation objects with a typo'd or unsupported kind; using a dialect-specific feature against SQLite.","solutions":["Check operation.kind before executing and avoid kinds SQLite doesn't support; use the typed query builder rather than raw operation objects.","Align versions: upgrade (or pin) data-table-sqlite and the core data-table package to the same release so the compiler knows every operation kind the core emits.","If you wrote the operation object by hand, compare it against a builder-produced operation to find the unsupported kind."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"const SUPPORTED = new Set(['select','insert','update','upsert','delete'])\nif (!SUPPORTED.has(operation.kind)) {\n  throw new Error(`Unsupported operation kind: ${operation.kind}`)\n}","typeGuard":"function isSupportedOperation(op: { kind: string }): boolean {\n  return ['select','insert','update','upsert','delete'].includes(op.kind)\n}","tryCatchPattern":null,"preventionTips":["Always build operations with the typed query builder, never raw objects.","Keep data-table and data-table-sqlite versions locked together in package.json."],"tags":["sqlite","sql-compiler","unsupported-operation","data-table"],"backgroundTag":"unsupported-operation-kind","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}