prorm API Reference
    Preparing search index...

    Function StatementTimeout

    • Decorator to set statement timeout. Abort queries that take longer than the specified timeout.

      Usage:

        @StatementTimeout(30000)  // 30 seconds
      async runLongQuery() {
      return await this.query('SELECT * FROM large_table');
      }

      Parameters

      • timeout: number

        Timeout in milliseconds

      Returns MethodDecorator