Ejemplo n.º 1
0
        public void ExtendDatabaseStructure(IConceptInfo conceptInfo, ICodeBuilder codeBuilder, out IEnumerable <Tuple <IConceptInfo, IConceptInfo> > createdDependencies)
        {
            var info = (AutoCodeForEachInfo)conceptInfo;

            createdDependencies = null;

            if (AutoCodeTriggerDatabaseDefinition.IsSupported(info.Property.DataStructure))
            {
                codeBuilder.InsertCode(Sql.Format("AutoCodeForEachDatabaseDefinition_ExtendCursorGroupValue", GetColumnName(info.Group), ShortStringPropertyInfo.MaxLength),
                                       AutoCodeDatabaseDefinition.ForEachGroupValueTag, info);
                codeBuilder.InsertCode("+'" + GetColumnName(info.Group) + "'",
                                       AutoCodeDatabaseDefinition.ForEachGroupColumnTag, info);
            }
        }
        public void ExtendDatabaseStructure(IConceptInfo conceptInfo, ICodeBuilder codeBuilder, out IEnumerable <Tuple <IConceptInfo, IConceptInfo> > createdDependencies)
        {
            AutoCodePropertyInfo info = (AutoCodePropertyInfo)conceptInfo;

            createdDependencies = null;

            if (AutoCodeTriggerDatabaseDefinition.IsSupported(info.Property.DataStructure))
            {
                codeBuilder.InsertCode(Sql.Format("AutoCodeDatabaseDefinition_ColumnDefinition",
                                                  info.Property.Name,
                                                  ShortStringPropertyInfo.MaxLength,
                                                  ForEachGroupColumnTag.Evaluate(info),
                                                  ForEachGroupValueTag.Evaluate(info)
                                                  ),
                                       AutoCodeTriggerDatabaseDefinition.ColumnsForAutoCodeSelectTag, info.Dependency_TriggerInfo);
            }
        }