prorm API Reference
    Preparing search index...

    Function isStored

    • Check if generated column is stored (persisted) or virtual.

      When options.stored is explicitly set, that value is used as-is. When it is left unspecified, the default depends on the target dialect:

      • PostgreSQL (before v18) only supports STORED generated columns — VIRTUAL is not a valid option, so it defaults to true (stored).
      • MySQL/MariaDB support both VIRTUAL and STORED, and default to VIRTUAL (the lighter-weight option), so this defaults to false.
      • Other dialects (sqlite, mssql, oracle) also default to false (virtual/computed, not persisted), matching their typical defaults.

      Parameters

      • options: GeneratedOptions

        The generated column options

      • dialect: GeneratedDialect = 'mysql'

        The target SQL dialect (defaults to 'mysql' for backwards compatibility)

      Returns boolean

      True if stored, false if virtual