Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Would like to add an oci8 driver for Oracle Support #45

Open
orware opened this issue Jun 25, 2020 · 1 comment
Open

Would like to add an oci8 driver for Oracle Support #45

orware opened this issue Jun 25, 2020 · 1 comment

Comments

@orware
Copy link

orware commented Jun 25, 2020

I've only briefly looked at the code in this repo, but I'd like to work on contributing an oci8 driver for Oracle support (in my experience the pdo_oci driver hasn't worked as well since PHP 7's release so I think the oci8 driver is still the best one for Oracle support).

Not sure if you have any tips as to all of the files that would need to be implemented to add the needed support (I have a rough idea based on how the other drivers are organized) but if you have any other direct tips please let me know and I'll see if I can take a crack at developing the needed classes and experimenting a bit more with Spiral over the weekend.

@wolfy-j
Copy link
Member

wolfy-j commented Jun 26, 2020

Hi,

implementing non-PDO drivers is possible but challenging. You have to implement a few things:

  1. https://github.com/spiral/database/blob/master/src/Driver/DriverInterface.php (it's only use PDO for type declarations)
  2. Query Compiler with Oracle-specific dialects - https://github.com/spiral/database/blob/master/src/Driver/CompilerInterface.php it shouldn't be that hard as it don't vary that much from other drivers (use AbstractCompiler)
  3. Schema compilers and readers - https://github.com/spiral/database/blob/master/src/Driver/HandlerInterface.php this one is going to be the hardest but not required (only for migration and schema reflection).

I would say if you can implement working Driver and Compiler it's already 70% of the work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants