InitCollections() static private method

static private InitCollections ( MySqlConnection connection ) : void
connection MySqlConnection
return void
Esempio n. 1
0
 internal static int GetMaxLength(string charset, MySqlConnection connection)
 {
     lock (CharSetMap.lockObject)
     {
         if (CharSetMap.maxLengths == null)
         {
             CharSetMap.InitCollections(connection);
         }
     }
     if (!CharSetMap.maxLengths.ContainsKey(charset))
     {
         return(1);
     }
     return(CharSetMap.maxLengths[charset]);
 }
Esempio n. 2
0
 internal static string GetDefaultCollation(string charset, MySqlConnection connection)
 {
     lock (CharSetMap.lockObject)
     {
         if (CharSetMap.defaultCollations == null)
         {
             CharSetMap.InitCollections(connection);
         }
     }
     if (!CharSetMap.defaultCollations.ContainsKey(charset))
     {
         return(null);
     }
     return(CharSetMap.defaultCollations[charset]);
 }