Beispiel #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;
        }
Beispiel #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;
         }
     }
 }
Beispiel #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)
 {
 }
Beispiel #4
0
        private string GetUniqueNameColumn(InternalObjectType objectType)
        {
            SchemaRowsetCacheData schemaRowsetCacheData = CubeMetadataCache.SchemaRowsetsData[CubeMetadataCache.GetIndexForInternalType(objectType)];

            return(schemaRowsetCacheData.UniqueNameColumnName);
        }