VersionedView.aliased constructor

VersionedView.aliased({
  1. required VersionedView source,
  2. required String? alias,
})

Copy an alias to a source view.

Implementation

VersionedView.aliased({required VersionedView source, required String? alias})
    : entityName = source.entityName,
      attachedDatabase = source.attachedDatabase,
      createViewStmt = source.createViewStmt,
      _columnFactories = source._columnFactories,
      $columns = [
        for (final column in source._columnFactories)
          column(alias ?? source.entityName)
      ],
      _alias = alias;