> For the complete documentation index, see [llms.txt](https://myroslavs-organization.gitbook.io/orm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://myroslavs-organization.gitbook.io/orm/api/decorators/computedcolumn.md).

# ComputedColumn

**ComputedColumn Decorator**

The `ComputedColumn` decorator is used to define computed columns in the database. It takes a `ComputedColumnDecoratorInterface` object as a parameter, which contains settings for the computed column.

**Parameters of `ComputedColumnDecoratorInterface`**

* **name:**
  * Type: `string`
  * Description: Specifies the name of the computed column in the database. If not provided, the property name in the class is used.
* **dataType:**
  * Type: `PostgresqlDataTypes | MysqlDataTypes`
  * Description: Specifies the data type for the computed column depending on the database type (PostgreSQL or MySQL).
* **calculate:**
  * Type: `string`
  * Description: Defines the formula or expression to be used for computing the column's value. The formula is written as a SQL query.
