Package: dataobject

A data structure that tracks changes for efficient serialization to a data store.

Package: dataobject

A data object is a special-purpose structure designed to hold data and track changes, allowing efficient serialization to a data store. It is the foundation on which all datastore entity types are built.

Repository: https://github.com/dracory/dataobject

Installation

go get github.com/dracory/dataobject

Features

  • Key/value data container with Get/Set/Has/Unset methods.
  • Dirty tracking — only modified fields are written back on save.
  • Typed getters (GetString, GetInt, GetBool, GetTime, etc.).
  • Hydrate/ToMap for loading from and exporting to maps.
  • Carbon-based timestamp helpers.

Where It Is Used

Every datastore entity (User, Post, Page, Log, Task, ...) embeds a DataObject. When you call entity.SetName(...) the change is tracked, and the store's update writes only the fields that changed.