OracleProcessor.php function processColumns donot return key "auto_increment"
jirapetr opened this issue · comments
Summary of problem or feature request
in
vendor/yajra/laravel-oci8/src/Oci8/Query/Processors/OracleProcessor.php
public function processColumns($results)
donot return key "auto_increment"
but for example
vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php
return [
'name' => $result->name,
'type_name' => strtok($type, '(') ?: '',
'type' => $type,
'collation' => null,
'nullable' => (bool) $result->nullable,
'default' => $result->default,
'auto_increment' => $hasPrimaryKey && $result->primary && $type === 'integer',
'comment' => null,
];
Code snippet of problem
I try generate
php artisan make:filament-resource User --generate
and receve
ErrorException
Undefined array key "auto_increment"
System details
- WIN 10
- PHP 82
- Laravel Version 10
- Laravel-OCI8 Version 10.5.1
Added a null placeholder for auto_increment to fix this error as I can't figure out yet how to determine if a field is incrementing or not.
Is the auto_increment key critical to your app? I am not using filament so can't say so. Please review PR #838 if it works then will merge afterwards. Thanks!
Without autoincrement
php artisan make:filament-resource
do not work :-(
..and what get inspiration in vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
`public function processColumns($results)
{
return array_map(function ($result) {
$result = (object) $result;
$autoincrement = $result->default !== null && str_starts_with($result->default, 'nextval(');`
..may be..