IfcDoc.FormatSQL.FormatEntity C# (CSharp) Method

FormatEntity() public method

public FormatEntity ( DocEntity docEntity, DocObject>.Dictionary map, bool>.Dictionary included ) : string
docEntity DocEntity
map DocObject>.Dictionary
included bool>.Dictionary
return string
        public string FormatEntity(DocEntity docEntity, Dictionary<string, DocObject> map, Dictionary<DocObject, bool> included)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("CREATE TABLE ");
            sb.Append(docEntity.Name);
            sb.Append(" (oid INTEGER");

            BuildFields(sb, docEntity, map);

            sb.Append(");");
            sb.AppendLine();

            foreach (DocAttribute docAttr in docEntity.Attributes)
            {
                if (docAttr.GetAggregation() != DocAggregationEnum.NONE && docAttr.Inverse == null)
                {
                    sb.AppendLine();
                    sb.Append("CREATE TABLE ");
                    sb.Append(docEntity.Name);
                    sb.Append("_");
                    sb.Append(docAttr.Name);
                    sb.Append(" (source INTEGER, sequence INTEGER, target INTEGER);");
                }
            }

            return sb.ToString();
        }