Forráskód Böngészése

added blob support

Nicolas Cannasse 12 éve
szülő
commit
8956f24a47
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      std/php/db/Mysql.hx

+ 3 - 1
std/php/db/Mysql.hx

@@ -124,7 +124,7 @@ private class MysqlResultSet implements ResultSet {
 		return _fieldsDesc;
 	}
 
-	private function convert(v : String, type : String) : Dynamic {
+	private function convert(v : Dynamic, type : String) : Dynamic {
 		if (v == null) return v;
 		switch(type) {
 			case "int", "year":
@@ -133,6 +133,8 @@ private class MysqlResultSet implements ResultSet {
 				return untyped __call__("floatval", v);
 			case "datetime", "date":
 				return Date.fromString(v);
+			case "blob":
+				return haxe.io.Bytes.ofData(v);
 			default:
 				return v;
 		}