compileIndexes method

void compileIndexes(
  1. StringBuffer buf,
  2. String tableName,
  3. int indent
)

Compiles the CREATE INDEX of each column of the table tableName declared with a standard index, which PostgreSQL has no clause of a CREATE TABLE for, indented by indent.

Implementation

void compileIndexes(StringBuffer buf, String tableName, int indent) {
  _columns.forEach((name, column) {
    if (column.indexType == IndexType.standardIndex) {
      buf.writeln(
        '${'  ' * indent}'
        '${compileCreateIndex(columnIndexName(tableName, name), tableName, [name])}',
      );
    }
  });
}