staudenmeir / laravel-cte

Laravel queries with common table expressions
MIT License
535 stars 40 forks source link

Oracle Driver #31

Closed jamespavett closed 1 year ago

jamespavett commented 3 years ago

Hello,

Is this any way this package can work with the OCI8 oracle driver.

https://github.com/yajra/laravel-oci8

Probably the largest database type not included. Currently just get "Call to undefined method" errors when trying to use.

staudenmeir commented 3 years ago

I looked into supporting Oracle for another package, but the local setup was such a nightmare that I gave up.

What would I need to install to get a local Oracle database for testing (macOS)? Maybe using Docker?

fernandocvargas commented 2 years ago

Hello friend. I have a development environment with oracle using yajra's OCI8, so I can test it! I really need oracle compatibility.

If you're interested I have an image on docker-hub to pass it on to you prepared for oracle.

staudenmeir commented 2 years ago

Thanks for your offer. Can I use this setup on my machine?

fernandocvargas commented 2 years ago

Pode, eu tenho uma imagem no docker pronta para usar com o OCI8.

Mas você tem acesso a uma base Oracle?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Em sex., 6 de mai. de 2022 às 17:16, Jonas Staudenmeir < @.***> escreveu:

Can I use this setup on my machine?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1119978815, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAQKM5HVLIEJABBK2M3VIV425ANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

fernandocvargas commented 2 years ago

Sorry, I ended up replying to you in my language lol.

Yes, I have a docker image ready to use with OCI8.

But do you have access to an Oracle database?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Em qua., 11 de mai. de 2022 às 14:43, Fernando Chechi de Vargas < @.***> escreveu:

Pode, eu tenho uma imagem no docker pronta para usar com o OCI8.

Mas você tem acesso a uma base Oracle?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#m_-5628612808011560108_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Em sex., 6 de mai. de 2022 às 17:16, Jonas Staudenmeir < @.***> escreveu:

Can I use this setup on my machine?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1119978815, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAQKM5HVLIEJABBK2M3VIV425ANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

:smile:

But do you have access to an Oracle database?

Unfortunately, I don't. I read a tutorial from Oracle on how to set up a (free) development database with Docker, but they apparently removed the Docker image.

I'll send you a dev branch to check out and test on your machine. I tested a few queries on https://dbfiddle.uk, so the basic queries should work.

staudenmeir commented 2 years ago

Do you already know what CTE queries you will run?

staudenmeir commented 2 years ago

Can you somehow provide a remote Oracle database for me to run a few tests?

fernandocvargas commented 2 years ago

Yes! I have a complex SQL to run with 6 CTE's.

Em qua., 11 de mai. de 2022 às 14:59, Jonas Staudenmeir < @.***> escreveu:

Do you already know what CTE queries you will run?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124096573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKARGG4SXQL7QFYGIJCLVJPYRNANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

fernandocvargas commented 2 years ago

Unfortunately I cannot provide the connection to my oracle bank, because I have a confidentiality agreement with my client.

Em qua., 11 de mai. de 2022 às 15:29, Jonas Staudenmeir < @.***> escreveu:

Can you somehow provide a remote Oracle database for me to run a few tests?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124157002, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAX7TSFHAYVJJKEH4ALVJP4CNANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

fernandocvargas commented 2 years ago

Share with me some branch where you have some implementation for OCI8! I can run tests here and keep you posted on the results.

Em qua., 11 de mai. de 2022 às 15:56, Fernando Chechi de Vargas < @.***> escreveu:

Unfortunately I cannot provide the connection to my oracle bank, because I have a confidentiality agreement with my client.

Em qua., 11 de mai. de 2022 às 15:29, Jonas Staudenmeir < @.***> escreveu:

Can you somehow provide a remote Oracle database for me to run a few tests?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124157002, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAX7TSFHAYVJJKEH4ALVJP4CNANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

Switch to the oracle branch in your composer.json:

"staudenmeir/laravel-cte": "dev-oracle",

Then run composer update staudenmeir/laravel-cte.

fernandocvargas commented 2 years ago

Perfect Jonas.

I will download it here and test it and keeping you posted.

Em qua., 11 de mai. de 2022 às 16:11, Jonas Staudenmeir < @.***> escreveu:

Switch to the oracle branch in your composer.json:

"staudenmeir/laravel-cte": "dev-oracle",

Then run composer update staudenmeir/laravel-cte.

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124192475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAWEM4NYXJ73NDHUV7LVJQA7LANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

Are you adding CTEs to the query builder (DB::) or Eloquent (User::)?

fernandocvargas commented 2 years ago

Eloquent (User::)

Em qua., 11 de mai. de 2022 às 16:47, Jonas Staudenmeir < @.***> escreveu:

Are you adding CTEs to the query builder (DB::) or Eloquent (User::)?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124223338, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAW4T6KJO4CLSJ23QNLVJQFGVANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

fernandocvargas commented 2 years ago

We had a problem with the compose update...

It requires at least PHP 8, we use 7.4 here

[image: image.png]

Em qua., 11 de mai. de 2022 às 16:11, Jonas Staudenmeir < @.***> escreveu:

Switch to the oracle branch in your composer.json:

"staudenmeir/laravel-cte": "dev-oracle",

Then run composer update staudenmeir/laravel-cte.

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124192475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAWEM4NYXJ73NDHUV7LVJQA7LANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

What version of Laravel?

fernandocvargas commented 2 years ago

I believe that if you change to accept PHP 7.4 in compose.json it solves the problem.

[image: image.png]

Em qua., 11 de mai. de 2022 às 17:08, Fernando Chechi de Vargas < @.***> escreveu:

We had a problem with the compose update...

It requires at least PHP 8, we use 7.4 here

[image: image.png]

Em qua., 11 de mai. de 2022 às 16:11, Jonas Staudenmeir < @.***> escreveu:

Switch to the oracle branch in your composer.json:

"staudenmeir/laravel-cte": "dev-oracle",

Then run composer update staudenmeir/laravel-cte.

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124192475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKAWEM4NYXJ73NDHUV7LVJQA7LANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

I need to create a new branch, the current one only works with Laravel 9.

fernandocvargas commented 2 years ago

The version we use in my client is Laravel 6 (yeah I know...).

But you also need to change your composer.json to at least accept php 7.4.

Em qua., 11 de mai. de 2022 às 17:11, Jonas Staudenmeir < @.***> escreveu:

What version of Laravel?

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124242903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKASDNN4TMTLLI57G3M3VJQH5VANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697

staudenmeir commented 2 years ago

Check out dev-oracle-laravel-6 instead and adjust your model:

"staudenmeir/laravel-cte": "dev-oracle-laravel-6",
class User extends Model
{
    use \Staudenmeir\LaravelCte\Eloquent\QueriesOracleExpressions;
}
fernandocvargas commented 2 years ago

Perfect Jonas.

Let's test it here, thank you very much for the support.

Em qua., 11 de mai. de 2022 às 17:43, Jonas Staudenmeir < @.***> escreveu:

Check out dev-oracle-laravel-6 instead and adjust your model:

"staudenmeir/laravel-cte": "dev-oracle-laravel-6",

class User extends Model { use \Staudenmeir\LaravelCte\Eloquent\QueriesOracleExpressions; }

— Reply to this email directly, view it on GitHub https://github.com/staudenmeir/laravel-cte/issues/31#issuecomment-1124277257, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKNKATL34WOAPOKIAOJMW3VJQLWNANCNFSM5GVEDLTA . You are receiving this because you commented.Message ID: @.***>

-- Att, Fernando Chechi de Vargas @. @.>* @. @.>*

Telefone (51) 995-546-697