Exemple #1
0
 public MySqlField(MySqlConnection connection)
 {
     this.connection = connection;
     this.connVersion = connection.driver.Version;
     this.maxLength = 1;
     this.binaryOk = true;
 }
Exemple #2
0
 public static CharacterSet GetChararcterSet(DBVersion version, string CharSetName)
 {
     CharacterSet set = mapping[CharSetName];
     if (set == null)
     {
         throw new MySqlException("Character set '" + CharSetName + "' is not supported");
     }
     return set;
 }
Exemple #3
0
 public static Encoding GetEncoding(DBVersion version, string CharSetName)
 {
     try
     {
         return Encoding.GetEncoding(GetChararcterSet(version, CharSetName).name);
     }
     catch (NotSupportedException)
     {
         return Encoding.GetEncoding(0);
     }
 }
Exemple #4
0
 internal static MySqlDateTime Parse(string s, DBVersion version)
 {
     MySqlDateTime time = new MySqlDateTime();
     return time.ParseMySql(s, version.isAtLeast(4, 1, 0));
 }