当前位置: 首页>>代码示例>>C#>>正文


C# IStructureSchema.GetIndexesTableNames方法代码示例

本文整理汇总了C#中IStructureSchema.GetIndexesTableNames方法的典型用法代码示例。如果您正苦于以下问题:C# IStructureSchema.GetIndexesTableNames方法的具体用法?C# IStructureSchema.GetIndexesTableNames怎么用?C# IStructureSchema.GetIndexesTableNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IStructureSchema的用法示例。


在下文中一共展示了IStructureSchema.GetIndexesTableNames方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Drop

        public override void Drop(IStructureSchema structureSchema)
        {
			Ensure.That(structureSchema, "structureSchema").IsNotNull();

        	var indexesTableNames = structureSchema.GetIndexesTableNames();

            var sql = SqlStatements.GetSql("DropStructureTables").Inject(
                indexesTableNames.IntegersTableName,
				indexesTableNames.FractalsTableName,
				indexesTableNames.BooleansTableName,
				indexesTableNames.DatesTableName,
				indexesTableNames.GuidsTableName,
				indexesTableNames.StringsTableName,
				indexesTableNames.TextsTableName,
                structureSchema.GetUniquesTableName(),
                structureSchema.GetStructureTableName());

            using (var cmd = CreateCommand(sql, new DacParameter("entityName", structureSchema.Name)))
            {
                cmd.ExecuteNonQuery();
            }
        }
开发者ID:BlackMael,项目名称:SisoDb-Provider,代码行数:22,代码来源:Sql2008DbClient.cs

示例2: ClearQueryIndexes

        public override void ClearQueryIndexes(IStructureSchema structureSchema)
        {
            Ensure.That(structureSchema, "structureSchema").IsNotNull();

            var sqlFormat = SqlStatements.GetSql("EmptyTable");
            var indexesTables = structureSchema.GetIndexesTableNames();

            using(var cmd = CreateCommand(null))
            {
                foreach (var tableName in indexesTables.All)
                {
                    cmd.CommandText = sqlFormat.Inject(tableName);
                    cmd.ExecuteNonQuery();
                }   
            }
        }
开发者ID:MikaelEliasson,项目名称:SisoDb-Provider,代码行数:16,代码来源:SqlCe4DbClient.cs

示例3: CreateGroupedIndexInsertActions

        protected virtual IndexInsertAction[] CreateGroupedIndexInsertActions(IStructureSchema structureSchema, IStructure[] structures)
        {
            var indexesTableNames = structureSchema.GetIndexesTableNames();
            var insertActions = new Dictionary<DataTypeCode, IndexInsertAction>(indexesTableNames.All.Length);
            foreach (var group in structures.SelectMany(s => s.Indexes).GroupBy(i => i.DataTypeCode))
            {
                var insertAction = CreateIndexInsertActionGroup(structureSchema, indexesTableNames, group.Key, group.ToArray());
                if (insertAction.HasData)
                    insertActions.Add(group.Key, insertAction);
            }

            var mergeStringsAndEnums = insertActions.ContainsKey(DataTypeCode.String) && insertActions.ContainsKey(DataTypeCode.Enum);
            if (mergeStringsAndEnums)
            {
                var strings = insertActions[DataTypeCode.String];
                var enums = insertActions[DataTypeCode.Enum];
                insertActions.Remove(DataTypeCode.Enum);

                insertActions[DataTypeCode.String] = CreateIndexInsertActionGroup(structureSchema, indexesTableNames, DataTypeCode.String, strings.Data.MergeWith(enums.Data).ToArray());
            }

            return insertActions.Values.ToArray();
        }
开发者ID:ovuncgursoy,项目名称:SisoDb-Provider,代码行数:23,代码来源:DbStructureInserter.cs


注:本文中的IStructureSchema.GetIndexesTableNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。