xo / usql

Universal command-line interface for SQL databases
MIT License
8.88k stars 347 forks source link

Oracle 9i Support #340

Closed MichalisDBA closed 2 years ago

MichalisDBA commented 2 years ago

Hello.

usql does not work with Oracle 9i.

From the github project

https://github.com/sijms/go-ora

there is an issue with the same thing and the developer suggests to use v1

https://github.com/sijms/go-ora/issues/208

Is it possible for me to build your project with go-ora v1?

Thanks.

kenshaw commented 2 years ago

Apologies, but no this is not a possibility. It would be fairly simple/easy to change the import path used in the ora driver, if you wanted to build a custom fork. Due to the way the drivers work, there'd be too much overhead in trying to get both drivers to sit side by side in the same binary.

MichalisDBA commented 2 years ago

Excuse my ignorance so if i fork your project i can change something in https://github.com/xo/usql/tree/master/drivers/oracle and point it to v1 and then build it?

kenshaw commented 2 years ago

All you would need to do is change the import path. Feel free to fork! The issue is that the registered driver names with Go are the same name. You'll get a panic if you try to import/use the two versions at the same time. Changing the import path should be a 1 line change, and then just doing a go mod tidy in the source root.

MichalisDBA commented 2 years ago

I'm fairly new to github as i only work as a DBA. What do you mean with the "import path". Is it somewhere in your code?

kenshaw commented 2 years ago

In the Go code -- here.

MichalisDBA commented 2 years ago

I built it, i can connect to Oracle 10 Database with the ora go v1 module but at version Oracle 9i i think it crashes? It does not show any output. Is there any command to show the error output?

kenshaw commented 2 years ago

Not really, no -- you'd need to ask the devs with the ora project. Sorry!