Example #1
0
        private static IEnumerable <Column> GetTableColumns(CaseConverter converter,
                                                            ObjectClass objClass, IEnumerable <PropertyDef> propertyDefs, bool ignoreBuiltinProperties)
        {
            var result             = new List <Column>();
            var asspciatedPropDefs = objClass.AssociatedPropertyDefs.Cast <AssociatedPropertyDef>();

            foreach (var apd in asspciatedPropDefs)
            {
                var pd = propertyDefs.FirstOrDefault(p => p.ID == apd.PropertyDef);
                if (pd is null || (ignoreBuiltinProperties && pd.Predefined))
                {
                    continue;
                }

                var nullable = apd.Required ? "NOT NULL" : "NULL";
                result.Add(new Column(converter.ToString(pd.Name), MapType(pd.DataType), !apd.Required));
            }
            return(result);
        }
Example #2
0
 private static string GetTableName(CaseConverter converter, ObjectClass objClass)
 {
     return(converter.ToString(objClass.Name));
 }