private CodeFile GenerateSelectByPrimaryKeyFunction(ApplicationType type, Field field, Domain domain) { var adapter = new SelectByFieldsDbTypeAdapter(type, $"select_by_{field.Name}", new List <Field> { field }, OperationType.Select, domain, true); return(GenerateTemplateFromAdapter(adapter, "SelectByForeignKeyTemplate")); }
private CodeFile GenerateSelectByConstraint(ApplicationType type, Constraint constraint, Domain domain) { var adapter = new SelectByFieldsDbTypeAdapter(type, $"select_by_{constraint.Name}", constraint.Fields, OperationType.Select, domain, false); return(GenerateTemplateFromAdapter(adapter, "SelectByForeignKeyTemplate")); }