Browse Source

Merge branch 'master' of github.com:mevdschee/php-crud-api

Maurits van der Schee 5 years ago
parent
commit
96ede406e0

+ 7
- 6
api.php View File

@@ -3619,11 +3619,11 @@ namespace Tqdev\PhpCrudApi\Column\Reflection {
3619 3619
         {
3620 3620
             $name = $json->name;
3621 3621
             $type = $json->type;
3622
-            $length = isset($json->length) ? $json->length : 0;
3623
-            $precision = isset($json->precision) ? $json->precision : 0;
3624
-            $scale = isset($json->scale) ? $json->scale : 0;
3625
-            $nullable = isset($json->nullable) ? $json->nullable : false;
3626
-            $pk = isset($json->pk) ? $json->pk : false;
3622
+            $length = isset($json->length) ? (int) $json->length : 0;
3623
+            $precision = isset($json->precision) ? (int) $json->precision : 0;
3624
+            $scale = isset($json->scale) ? (int) $json->scale : 0;
3625
+            $nullable = isset($json->nullable) ? (bool) $json->nullable : false;
3626
+            $pk = isset($json->pk) ? (bool) $json->pk : false;
3627 3627
             $fk = isset($json->fk) ? $json->fk : '';
3628 3628
             return new ReflectedColumn($name, $type, $length, $precision, $scale, $nullable, $pk, $fk);
3629 3629
         }
@@ -6297,6 +6297,7 @@ namespace Tqdev\PhpCrudApi\Database {
6297 6297
                 'smallint' => 'integer',
6298 6298
                 'real' => 'float',
6299 6299
                 'numeric' => 'decimal',
6300
+                'nclob' => 'clob',
6300 6301
                 'time_with_timezone' => 'time',
6301 6302
                 'timestamp_with_timezone' => 'timestamp',
6302 6303
             ],
@@ -6389,7 +6390,7 @@ namespace Tqdev\PhpCrudApi\Database {
6389 6390
             //'datalink' => true,
6390 6391
             'date' => true,
6391 6392
             'decimal' => true,
6392
-            'distinct' => true,
6393
+            //'distinct' => true,
6393 6394
             'double' => true,
6394 6395
             'float' => true,
6395 6396
             'integer' => true,

+ 5
- 5
src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedColumn.php View File

@@ -91,11 +91,11 @@ class ReflectedColumn implements \JsonSerializable
91 91
     {
92 92
         $name = $json->name;
93 93
         $type = $json->type;
94
-        $length = isset($json->length) ? $json->length : 0;
95
-        $precision = isset($json->precision) ? $json->precision : 0;
96
-        $scale = isset($json->scale) ? $json->scale : 0;
97
-        $nullable = isset($json->nullable) ? $json->nullable : false;
98
-        $pk = isset($json->pk) ? $json->pk : false;
94
+        $length = isset($json->length) ? (int) $json->length : 0;
95
+        $precision = isset($json->precision) ? (int) $json->precision : 0;
96
+        $scale = isset($json->scale) ? (int) $json->scale : 0;
97
+        $nullable = isset($json->nullable) ? (bool) $json->nullable : false;
98
+        $pk = isset($json->pk) ? (bool) $json->pk : false;
99 99
         $fk = isset($json->fk) ? $json->fk : '';
100 100
         return new ReflectedColumn($name, $type, $length, $precision, $scale, $nullable, $pk, $fk);
101 101
     }

+ 2
- 1
src/Tqdev/PhpCrudApi/Database/TypeConverter.php View File

@@ -43,6 +43,7 @@ class TypeConverter
43 43
             'smallint' => 'integer',
44 44
             'real' => 'float',
45 45
             'numeric' => 'decimal',
46
+            'nclob' => 'clob',
46 47
             'time_with_timezone' => 'time',
47 48
             'timestamp_with_timezone' => 'timestamp',
48 49
         ],
@@ -135,7 +136,7 @@ class TypeConverter
135 136
         //'datalink' => true,
136 137
         'date' => true,
137 138
         'decimal' => true,
138
-        'distinct' => true,
139
+        //'distinct' => true,
139 140
         'double' => true,
140 141
         'float' => true,
141 142
         'integer' => true,

Loading…
Cancel
Save