예제 #1
0
        private void CreatePrimaryKeys(DataTable table, InternalObjectType objectType)
        {
            SchemaRowsetCacheData schemaRowsetCacheData = CubeMetadataCache.SchemaRowsetsData[CubeMetadataCache.GetIndexForInternalType(objectType)];

            DataColumn[] array = new DataColumn[schemaRowsetCacheData.PrimaryKeyColumns.Length];
            for (int i = 0; i < schemaRowsetCacheData.PrimaryKeyColumns.Length; i++)
            {
                array[i] = table.Columns[schemaRowsetCacheData.PrimaryKeyColumns[i]];
            }
            table.PrimaryKey = array;
        }
예제 #2
0
 private static void AddSpecificRestrictions(SchemaRowsetCacheData data, ListDictionary restrictions)
 {
     if (data.AdditionalStaticRestrictions != null)
     {
         KeyValuePair <string, string>[] additionalStaticRestrictions = data.AdditionalStaticRestrictions;
         for (int i = 0; i < additionalStaticRestrictions.Length; i++)
         {
             KeyValuePair <string, string> keyValuePair = additionalStaticRestrictions[i];
             restrictions[keyValuePair.Key] = keyValuePair.Value;
         }
     }
 }
예제 #3
0
 internal ObjectMetadataCache(IMetadataCache metadataCache, AdomdConnection connection, SchemaRowsetCacheData rowsetData, ListDictionary restrictions) : this(metadataCache, connection, (rowsetData == null) ? InternalObjectType.InternalTypeMemberProperty : rowsetData.ObjectType, (rowsetData == null) ? null : rowsetData.RequestType, restrictions, (rowsetData == null) ? null : rowsetData.RelationColumnName)
 {
 }
예제 #4
0
        private string GetUniqueNameColumn(InternalObjectType objectType)
        {
            SchemaRowsetCacheData schemaRowsetCacheData = CubeMetadataCache.SchemaRowsetsData[CubeMetadataCache.GetIndexForInternalType(objectType)];

            return(schemaRowsetCacheData.UniqueNameColumnName);
        }