toCreateEntityStr method

String toCreateEntityStr()

Implementation

String toCreateEntityStr() {
  String result = "";
  fields().forEach((field) {
    if (field.displayOnly == null || !field.displayOnly) {
      if (result.length > 0) {
        result = "$result, ";
      }
      String fieldCreation = field.toCreateFieldStr();
      result = "$result$fieldCreation";
    }
  });
  String priKeyStr = toPrimaryKeyStr();
  return "CREATE TABLE $entityName($result$priKeyStr)";
}