createSql method

String createSql(
  1. MoorOptions options
)

The CREATE VIEW statement that can be used to create this view.

Implementation

String createSql(MoorOptions options) {
  final decl = declaration as MoorViewDeclaration?;
  if (decl == null) {
    throw StateError('Cannot show SQL for views without a declaration');
  }

  return decl.formatSqlIfAvailable(options) ?? decl.createSql;
}