with()
— Allows you to define a non-recursive CTE.withRecursive()
— Allows you to define a recursive CTE.recursive
keyword anytime at least one of your CTEs is recursive, but some database engines (e.g. SQL Server and Oracle) do not require the keyword. qb will manage adding the keyword, if necessary. If your query does use recursion you should use the withRecursive()
method to avoid issues when migrating grammars.true
true
false
[]
false
false
withRecursive
where possible.true
true
false
[]