Пример #1
0
 public static function formatValue($value, $type)
 {
     $value = parent::formatValue($value, $type);
     if (' ' === $value) {
         // SQL Anywhere strangely returns empty string as a single space string
         return '';
     }
     return $value;
 }
Пример #2
0
 public static function formatValue($value, $type)
 {
     if ('int' === $type && '' === $value) {
         // Postgresql strangely returns "" for null integers
         return null;
     }
     return parent::formatValue($value, $type);
 }
Пример #3
0
 public static function formatValue($value, $type)
 {
     switch (strtolower(strval($type))) {
         case 'int':
         case 'integer':
             if ('' === $value) {
                 // Postgresql strangely returns "" for null integers
                 return null;
             }
     }
     return parent::formatValue($value, $type);
 }