Type Alias: StateAllUpdate<T>

StateAllUpdate<T> = LixUpdateable<EntityStateAllView<T>>

Type for updating entities in specific versions.

This type makes all columns optional for partial updates and includes version control. You can update entities in any version or change an entity's version.

Type Parameters

T

T

Example

// Use StateAllUpdate for version-specific updates
async function toggleFeatureFlag(
  key: string,
  versionId: string,
  enabled: boolean
) {
  const updates: StateAllUpdate<KeyValue> = {
    value: enabled
  };

  await lix.db
    .updateTable("key_value_all")
    .set(updates)
    .where("key", "=", key)
    .where("lixcol_version_id", "=", versionId)
    .execute();
}