Closed zekuraz closed 1 year ago
How are you trying to use withRecursiveExpression()
? What does the query look like?
Something like this
`$query = DB::table('users as u') ->selectRaw("u.name, d.label, 0 AS Niveau") ->join('description AS d','u.id','=','d.parent_id') ->where('u.id, '=' ,'0123456789') ->unionAll( DB::table('users AS s') ->selectRaw("s.name, p.label, Niveau+1 AS Niveau") ->join('description AS p,'s.id','=','p.parent_id') ->join('nomenclature AS n','n.id','=',' s.id') );
$tree = DB::table('nomenclature') ->withRecursiveExpression('nomenclature', $query) ->get();`
You can use the workaround for Lumen and instantiate the query builder manually:
$builder = new \Staudenmeir\LaravelCte\Query\Builder(DB::connection());
$tree = $builder->from('nomenclature')->withRecursiveExpression('nomenclature', $query)->get();
i have this error message
This database is not supported.
Sorry, I didn't see that the package actually adds support for a new DBMS. In this case, I would need to extend this package, but I don't have a way to test it.
Hello,
Is this any way this package can work with the db2 driver.
https://github.com/cooperl22/laravel-db2
When i try this package, i have a "Call to undefined method Illuminate\Database\Query\Builder::withRecursiveExpression()"