# data/

This guide was generated by `xuda-cli`.

You can remove all generated folder guides later with:

~~~bash
npm run clean:readmes
~~~

This folder groups Xuda logic units that work with data.

## Subfolders

- `data/get/`
  Read data and return rows or values
- `data/set/`
  Create, update, or delete data
- `data/batch/`
  Iterate over many records and run workflows per record

## How to choose

Use `get_data` when:

- you are reading from a table, array, JSON, or CSV source
- you want a clear source file for "load data"

Use `set_data` when:

- you are saving, updating, or deleting records
- you want persistence to live outside UI code

Use `batch` when:

- you need record-by-record processing
- you want `before_record` or `after_record` workflows

## Common rules

- file type: `.xu`
- use `<meta>`, `<params>`, and `<datasource>` as the core blocks
- add `<fields>` when the unit needs local working state
- add `<events>` when the unit needs lifecycle or record workflows
