コード例 #1
0
        /// <summary>
        /// Displays the DDL to the console
        /// </summary>
        /// <param name="Cols">A List of ProfileColumn with column name and data type information</param>

        static void ShowDDL(List <ProfileColumn> Cols)
        {
            string TableName       = Cfg.Tbl;
            bool   CreateAsVarchar = !Cfg.Typed;
            string DDLStatement    = ProfileColumn.GenerateCreateTableStatement(Cols, TableName, CreateAsVarchar);

            Log.InformationMessage("Target table creation DDL statement:\n====================================\n{0}", DDLStatement);
        }
コード例 #2
0
        /// <summary>
        /// Creates the target table
        /// </summary>
        /// <param name="Cols">A List of ProfileColumn with column name and data type information</param>

        static void CreateTable(List <ProfileColumn> Cols)
        {
            string TableName = Cfg.Tbl;

            Log.InformationMessage("Creating table: {0}", TableName);
            bool   CreateAsVarchar = !Cfg.Typed;
            string DDLStatement    = ProfileColumn.GenerateCreateTableStatement(Cols, TableName, CreateAsVarchar);

            ServerUtils.ExecSql(Cfg.Server, Cfg.Db, DDLStatement);
        }