Support to Firebird
gssj85 opened this issue · 9 comments
Hi,
I would like to contribute with support to Firebird however this would be my very first contribution I'm not sure where to start, I'm a mid-level developer but with some guidance I could make the adjustments to add Firebird, they look minor.
Hi @gssj85,
The first step would be to add support for Firebird to the underlying CTE package:
https://github.com/staudenmeir/laravel-cte
Are you using https://github.com/harrygulliford/laravel-firebird to connect to Firebird?
Hi @gssj85, The first step would be to add support for Firebird to the underlying CTE package: https://github.com/staudenmeir/laravel-cte
Are you using https://github.com/harrygulliford/laravel-firebird to connect to Firebird?
Thanks for the guidance and yes I'm using https://github.com/harrygulliford/laravel-firebird
Just in the last few weeks, the CTE package added support for new database drivers. Take inspiration from them:
https://github.com/staudenmeir/laravel-cte/pull/48/files
https://github.com/staudenmeir/laravel-cte/pull/50/files
And let me know if you have any questions.
What part of the package would you like to use with Firebird? Trees or graphs?
I did implement "manually" the tree functionality I needed, the crucial logic I got from your lib by inspecting the code (thank you very much).
If I can suggest I think it's most important to get the CTE working first, look at what I had to do without laravel-cte haha:
return '(WITH '
. "conta_receber_query AS ($conta_receber), "
. "conta_pagar_query AS ($conta_pagar)"
. PHP_EOL
. "$acrescimo_desconto) as CONTAS";
Whhere the queries sql were added using:
Str::replaceArray('?', $query->getBindings(), $query->toSql())
I put that inside a ->from()
But if you can get this working too, kudos to you, just think the most "urgent" is the CTE...
edit: taking a second look this post doesn't really add to the subject, just wanted you to know, you can delete it after reading no problem!
I've released a new version with support for Firebird.
Nice, thank you. Unfortunatelly I'm on Laravel 9 still so no CTE to me hehe but I think we will be upgrading the project to 10 or 11 "soon". =)