Exemple #1
0
 public static string RemoveColumn(PropertyInfo property, string columnName)
 {
     return(Sql.Format("PropertyDatabaseDefinition_RemoveColumn",
                       SqlUtility.Identifier(property.DataStructure.Module.Name),
                       SqlUtility.Identifier(property.DataStructure.Name),
                       DslUtility.ValidateIdentifier(columnName, property, "Invalid column name."),
                       BeforeRemoveTag.Evaluate(property)).Trim());
 }
Exemple #2
0
        public static string AddColumn(ConceptMetadata conceptMetadata, PropertyInfo property, string options = "")
        {
            string columnName = conceptMetadata.Get(property, ColumnNamesMetadata).Single();

            return(Sql.Format("PropertyDatabaseDefinition_AddColumn",
                              SqlUtility.Identifier(property.DataStructure.Module.Name),
                              SqlUtility.Identifier(property.DataStructure.Name),
                              DslUtility.ValidateIdentifier(columnName, property, "Invalid column name."),
                              conceptMetadata.Get(property, ColumnTypesMetadata).Single(),
                              options,
                              Options1Tag.Evaluate(property),
                              Options2Tag.Evaluate(property),
                              AfterCreateTag.Evaluate(property)).Trim());
        }