Help for cdv.update

cdv ยท update

Sample CLI

gway cdv update

References

Full Code

def update(table_path: str, entry_id: str, **fields):
    """Append or update a record in the CDV table, preserving unspecified fields."""
    if not entry_id or not table_path:
        return
    path = _resolve_path(table_path)
    records = _read_table(path)
    existing = records.get(entry_id, {})
    existing.update(fields)
    records[entry_id] = existing
    _write_table(path, records)
    gw.info(f"Updated table with ID={entry_id}")