Example #1
0
        public Table(string Name, Collates Collate = Collates.Defualt, Engines Engine = Engines.InnoDB)
        {
            this.Name    = Name;
            this.Collate = Collate;
            this.Engine  = Engine;

            columns = new List <Column>();
        }
Example #2
0
            private static void GenerateCollate(Collates Collate, StringBuilder Builder)
            {
                Builder.Append("DEFAULT CHARACTER SET =");

                switch (Collate)
                {
                case Collates.Defualt:
                    Builder.Append("utf8");
                    break;

                case Collates.UTF8:
                    Builder.Append("utf8mb4");
                    break;

                case Collates.ASCII:
                    Builder.Append("utf8");
                    break;
                }

                Builder.Append(" COLLATE =");

                switch (Collate)
                {
                case Collates.Defualt:
                    Builder.Append("utf8_general_ci");
                    break;

                case Collates.UTF8:
                    Builder.Append("utf8mb4_general_ci");
                    break;

                case Collates.ASCII:
                    Builder.Append("utf8_general_ci");
                    break;
                }
            }
Example #3
0
        public Table(string Name, Collates Collate, Engines Engine, IndexGroup IndexGroup, params Column[] Columns) : this(Name, Collate, Engine)
        {
            columns.AddRange(Columns);

            this.IndexGroup = IndexGroup;
        }
Example #4
0
 public Table(string Name, Collates Collate, Engines Engine, params Column[] Columns) : this(Name, Collate, Engine)
 {
     columns.AddRange(Columns);
 }