static string MapFilePath(M.Database db) { M.PropertySet dbConnProps = App.CreatePropertySetParse(db.Connection); string path = dbConnProps.GetProperty("Source"); return(path); }
static string CreateStatementBody(M.Database db, string name) { List <string> items = new List <string>(); string type = db.GetComponentType(name).ToUpper(); if (type == "TABLE") { using (M.Table table = db.Search(name)) { M.Schema schema = table.GetSchema(); items.AddRange(FieldItems(schema.Fields)); items.AddRange(IndexItems(schema.Indexes)); items.AddRange(ConstraintItems(schema.Constraints)); } } M.PropertySet propertySet = db.GetProperties(name); items.AddRange(PropertyItems(propertySet)); string body = String.Join("," + Environment.NewLine, items.Select(i => String.Concat(Indent, i))); return(body); }
private static List <string> PropertyItems(M.PropertySet propSet) { List <string> ps = new List <string>(); foreach (M.Property p in propSet) { ps.Add(PropertyItem(p.Name, p.Data)); } return(ps); }