Пример #1
0
        private void ParseTableData(DataRow tableRow)
        {
            Schema       = tableRow["TABLE_SCHEMA"].ToString();
            Name         = tableRow["TABLE_NAME"].ToString();
            Engine       = tableRow["ENGINE"].ToString();
            RowFormat    = (RowFormat)Enum.Parse(typeof(RowFormat), tableRow["ROW_FORMAT"].ToString());
            AvgRowLength = DataRowHelpers.GetValueAsUInt64(tableRow, "AVG_ROW_LENGTH");
            AutoInc      = DataRowHelpers.GetValueAsUInt64(tableRow, "AUTO_INCREMENT");
            Comment      = tableRow["TABLE_COMMENT"].ToString();
            Collation    = tableRow["TABLE_COLLATION"].ToString();
            if (Collation != null)
            {
                int index = Collation.IndexOf("_");
                if (index != -1)
                {
                    CharacterSet = Collation.Substring(0, index);
                }
            }

            string createOpt = (string)tableRow["CREATE_OPTIONS"];

            if (string.IsNullOrEmpty(createOpt))
            {
                ParseCreateOptions(createOpt.ToLowerInvariant());
            }
        }