コード例 #1
0
        public String CreateSubObjects(Boolean withFk)
        {
            StringBuilder script = new StringBuilder();

            if (PrimarKey != null)
            {
                script.AppendLine(PrimarKey.CreateScript());
                script.AppendLine();
            }

            script.Append(UniqueConstraints.CreateAllScript());
            script.Append(Indexes.CreateAllScript());
            script.Append(CheckConstraints.CreateAllScript());
            script.Append(DefaultConstraints.CreateAllScript());

            if (withFk)
            {
                script.Append(ForeignKeys.CreateAllScript());
            }
            return(script.ToString());
        }