@@ -594,6 +594,24 @@ public static function provideCases(): iterable
594594 },
595595 ];
596596
597+ yield 't.col_int + t.col_float + t.col_decimal ' => [
598+ 'data ' => self ::dataDefault (),
599+ 'select ' => 'SELECT t.col_int + t.col_float + t.col_decimal FROM %s t ' ,
600+ 'mysql ' => self ::float (),
601+ 'sqlite ' => self ::float (),
602+ 'pdo_pgsql ' => self ::numericString (),
603+ 'pgsql ' => self ::float (),
604+ 'mssql ' => new MixedType (),
605+ 'mysqlResult ' => 9.225 ,
606+ 'sqliteResult ' => 9.225 ,
607+ 'pdoPgsqlResult ' => '9.225 ' ,
608+ 'pgsqlResult ' => 9.225 ,
609+ 'mssqlResult ' => 9.225 ,
610+ 'shouldStringify ' => static function (string $ driver , int $ php , string $ configName ): bool {
611+ return self ::defaultStringification ($ driver , $ php , $ configName );
612+ },
613+ ];
614+
597615 yield 't.col_decimal + t.col_decimal ' => [
598616 'data ' => self ::dataDefault (),
599617 'select ' => 'SELECT t.col_decimal + t.col_decimal FROM %s t ' ,
@@ -630,6 +648,24 @@ public static function provideCases(): iterable
630648 },
631649 ];
632650
651+ yield 't.col_int + t.col_string (int data) ' => [
652+ 'data ' => self ::dataAllIntLike (),
653+ 'select ' => 'SELECT t.col_int + t.col_string FROM %s t ' ,
654+ 'mysql ' => self ::float (),
655+ 'sqlite ' => self ::int (),
656+ 'pdo_pgsql ' => null , // Undefined function
657+ 'pgsql ' => null , // Undefined function
658+ 'mssql ' => self ::mixed (),
659+ 'mysqlResult ' => 2.0 ,
660+ 'sqliteResult ' => 2 ,
661+ 'pdoPgsqlResult ' => null ,
662+ 'pgsqlResult ' => null ,
663+ 'mssqlResult ' => 2 ,
664+ 'shouldStringify ' => static function (string $ driver , int $ php , string $ configName ): bool {
665+ return self ::defaultStringification ($ driver , $ php , $ configName );
666+ },
667+ ];
668+
633669 yield 't.col_int + t.col_bool ' => [
634670 'data ' => self ::dataDefault (),
635671 'select ' => 'SELECT t.col_int + t.col_bool FROM %s t ' ,
@@ -774,6 +810,24 @@ public static function provideCases(): iterable
774810 },
775811 ];
776812
813+ yield 't.col_int / t.col_float / t.col_decimal ' => [
814+ 'data ' => self ::dataDefault (),
815+ 'select ' => 'SELECT t.col_int / t.col_float / t.col_decimal FROM %s t ' ,
816+ 'mysql ' => self ::float (),
817+ 'sqlite ' => self ::float (),
818+ 'pdo_pgsql ' => self ::numericString (),
819+ 'pgsql ' => self ::float (),
820+ 'mssql ' => new MixedType (),
821+ 'mysqlResult ' => 720.0 ,
822+ 'sqliteResult ' => 720.0 ,
823+ 'pdoPgsqlResult ' => '720 ' ,
824+ 'pgsqlResult ' => 720.0 ,
825+ 'mssqlResult ' => 720.0 ,
826+ 'shouldStringify ' => static function (string $ driver , int $ php , string $ configName ): bool {
827+ return self ::defaultStringification ($ driver , $ php , $ configName );
828+ },
829+ ];
830+
777831 yield 't.col_bigint / t.col_float ' => [
778832 'data ' => self ::dataDefault (),
779833 'select ' => 'SELECT t.col_bigint / t.col_float FROM %s t ' ,
@@ -900,6 +954,24 @@ public static function provideCases(): iterable
900954 },
901955 ];
902956
957+ yield 't.col_int / t.col_string (int data) ' => [
958+ 'data ' => self ::dataAllIntLike (),
959+ 'select ' => 'SELECT t.col_int / t.col_string FROM %s t ' ,
960+ 'mysql ' => self ::floatOrNull (),
961+ 'sqlite ' => self ::intOrNull (),
962+ 'pdo_pgsql ' => null , // Undefined function
963+ 'pgsql ' => null , // Undefined function
964+ 'mssql ' => self ::mixed (),
965+ 'mysqlResult ' => 1.0 ,
966+ 'sqliteResult ' => 1 ,
967+ 'pdoPgsqlResult ' => null ,
968+ 'pgsqlResult ' => null ,
969+ 'mssqlResult ' => 1 ,
970+ 'shouldStringify ' => static function (string $ driver , int $ php , string $ configName ): bool {
971+ return self ::defaultStringification ($ driver , $ php , $ configName );
972+ },
973+ ];
974+
903975 yield 't.col_string / t.col_int ' => [
904976 'data ' => self ::dataDefault (),
905977 'select ' => 'SELECT t.col_string / t.col_int FROM %s t ' ,
@@ -3491,10 +3563,6 @@ public static function provideCases(): iterable
34913563 return false ;
34923564 },
34933565 ];
3494-
3495- // TODO would col_numeric_string differ from col_string results ?
3496- // TODO dbal/orm versions
3497- // TODO run sqlsrv with custom setup (numeric, leading zero, native datetimes), check if implementable with current API
34983566 }
34993567
35003568 /**
0 commit comments