remix-run/remix · error · Error

Unsupported operation kind

Error message

Unsupported operation kind

What it means

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.

Source

Thrown at packages/data-table-sqlite/src/lib/sql-compiler.ts:120

    }
  }

  if (operation.kind === 'delete') {
    return {
      text:
        'delete from ' +
        quotePath(getTableName(operation.table)) +
        compileWhereClause(operation.where, context) +
        compileReturningClause(operation.returning),
      values: context.values,
    }
  }

  if (operation.kind === 'upsert') {
    return compileUpsertOperation(operation, context)
  }

  throw new Error('Unsupported operation kind')
}

function compileInsertOperation(
  table: OperationTable,
  values: Record<string, unknown>,
  returning: '*' | string[] | undefined,
  context: CompileContext,
): SqlStatement {
  let columns = Object.keys(values)

  if (columns.length === 0) {
    return {
      text:
        'insert into ' +
        quotePath(getTableName(table)) +
        ' default values' +
        compileReturningClause(returning),
      values: context.values,

View on GitHub (pinned to 9696913134)

Solutions

  1. Check operation.kind before executing and avoid kinds SQLite doesn't support; use the typed query builder rather than raw operation objects.
  2. 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.
  3. If you wrote the operation object by hand, compare it against a builder-produced operation to find the unsupported kind.
Defensive patterns

Strategy: type-guard

Validate before calling

const SUPPORTED = new Set(['select','insert','update','upsert','delete'])
if (!SUPPORTED.has(operation.kind)) {
  throw new Error(`Unsupported operation kind: ${operation.kind}`)
}

Type guard

function isSupportedOperation(op: { kind: string }): boolean {
  return ['select','insert','update','upsert','delete'].includes(op.kind)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of remix-run/remix@9696913134 (2026-08-27). Data as JSON: /api/errors/594a417cc6fa6e49. Report an issue: GitHub.