Пример #1
0
        public static bool DefaultValuesMatch(ColumnDefinition col1, ColumnDefinition col2)
        {
            if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue && col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
            {
                return(true);
            }
            if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue || col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
            {
                return(true);
            }
            FirebirdColumn column    = new FirebirdColumn(new FirebirdOptions());
            string         col1Value = column.GenerateForDefaultAlter(col1);
            string         col2Value = column.GenerateForDefaultAlter(col2);

            return(col1Value != col2Value);
        }
        public static bool DefaultValuesMatch(ColumnDefinition col1, ColumnDefinition col2)
        {
            if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue && col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
            {
                return(true);
            }
            if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue || col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
            {
                return(true);
            }

            var            fbOptions = new FirebirdOptions();
            FirebirdColumn column    = new FirebirdColumn(fbOptions, new FirebirdQuoter(fbOptions, new OptionsWrapper <QuoterOptions>(new QuoterOptions())));
            string         col1Value = column.GenerateForDefaultAlter(col1);
            string         col2Value = column.GenerateForDefaultAlter(col2);

            return(col1Value != col2Value);
        }
Пример #3
0
 public static bool DefaultValuesMatch(ColumnDefinition col1, ColumnDefinition col2)
 {
     if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue && col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
         return true;
     if (col1.DefaultValue is ColumnDefinition.UndefinedDefaultValue || col2.DefaultValue is ColumnDefinition.UndefinedDefaultValue)
         return true;
     FirebirdColumn column = new FirebirdColumn(new FirebirdOptions());
     string col1Value = column.GenerateForDefaultAlter(col1);
     string col2Value = column.GenerateForDefaultAlter(col2);
     return col1Value != col2Value;
 }