Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for oracle #19

Open
darkwisperer opened this issue Mar 15, 2016 · 23 comments
Open

Support for oracle #19

darkwisperer opened this issue Mar 15, 2016 · 23 comments

Comments

@darkwisperer
Copy link

First off I plan to submit a PR for this. There were a couplethings I wanted feedback on.

jsdbc is the npm package I am leaning towards using since it does not require the Oracle libs to be downloaded seperatly. The bonus to using jsdbc is that it supports SQLite. Which would allow the addition of two more database clients with little extra work.

The other option is the Oracle supported oracledb which require python 2.7, C Compiler with support for C++ 11, the oracle client libraries (OS specific). I think that these added "requirements" would bloat the core and add unnecessary complexities for the releases per OS.

Now I know I can get manual tests with oracle set up easily. I could not find a single CI that supported Oracle as a DB. I was thinking that Oracle would be a manual only test. Any thoughts or advice on this would be appreciated.

@maxclaus
Copy link
Member

Hi @darkwisperer,

Even with a more difficult configuration I rather use the official package oracledb because seems have a better support. And including the sqlite later with a separated lib should not be so difficult.

I think we can ignore by default the integration tests on oracle. Something like knex does.

Seems is possible to use Oracle with Travis Ci through this script https://github.com/cbandy/travis-oracle.
In case is not really possible use a CI with Oracle I still can run the test over a docker image https://hub.docker.com/_/oraclelinux/. So could run the tests manually at least before every new release.

And thanks for the interest helping this project 😄

@darkwisperer
Copy link
Author

Sounds good. Nice find for Travis-CI! I will start working on this and attempt to get CI testing through travis for it.

@darkwisperer
Copy link
Author

Since Oracledb package requires certain libs and reqs, how do we want to go about making sure the host meets these requirements?
We might have to add a repo for the libs per OS since the only way to get them from Oracle is manual.

Progress has been slow but its getting there.

@maxclaus
Copy link
Member

Is this problem related to the dev environment or the "production" environment?

For the production environment, I think there is no problem. Since the electron app is released with all dependencies built in. I was thinking in just check if the oracle is available before requiring the oracle module or something like that.

For the dev environment. Does it throw any error on installing the oracle lib without have the oracle already installed?

  • If it does not. We could do the same of production environment.
  • If it does. I think we could let the oracle out of the dev dependencies. And document it must be installed manually for those working with oracle.

@darkwisperer
Copy link
Author

Its required for both dev/testing and for release. If the libs or reqs are missing the npm install of oracledb fails and raises an error.

@maxclaus
Copy link
Member

I don't care installing the oracle on my machine to release the app.
And for dev/testing I guess we could try that last approach I mentioned earlier. Is a similar approach Knex does. They have support for oracle as well, but is not included in the dev dependencies. This way anyone that need to test oracle, have to install the oracle by themselves.

@darkwisperer
Copy link
Author

Sounds good. I will make sure to keep oracle out of the dev dependencies.

@BornaP
Copy link
Member

BornaP commented Apr 14, 2016

Hey @darkwisperer , how are you standing with this? :)

@darkwisperer
Copy link
Author

HI @BornaP,
I ran into issues getting the tests to run on my dev VM (postgres caused issues when trying to singularly test oracle, I probably had config issues), then life got in the way. I don't think I will be able to work on it any time soon. :(
If you are feeling industrious, it is up for grabs. :)

@BornaP
Copy link
Member

BornaP commented Apr 14, 2016

Oh, sorry to hear that :/ Well then, I'll probably take a look next week if this will still be open.

@piclemx
Copy link

piclemx commented Jan 12, 2017

This issue still alive?

@maxclaus
Copy link
Member

I believe nobody is working on this now.

@piclemx
Copy link

piclemx commented Jan 13, 2017

Okok :( , Do you know if someone can take this?

@maxclaus
Copy link
Member

Sorry, I don't use Oracle. So I have no interest investing my time on this. If you are interested in helping. Please send a PR. I could help with any development question you have. Otherwise lets still waiting for somebody else :(

@mcharris
Copy link

mcharris commented Nov 30, 2017

How does one go about working on this one? Our office heavily uses oracle and I have grown tired of using Oracle SQL Developer.

I would like to work on this issue.

@BornaP
Copy link
Member

BornaP commented Dec 3, 2017

Sure, you're more than welcome to contribute. I think nobody is working on this issue right now.

@armarti
Copy link

armarti commented Oct 5, 2018

Just a thought, what if the bulky oracledb package could be optionally downloaded by the end user? IntelliJ Ultimate does something similar where you click a button to download the JDBC jars the first time you use a particular database type.

There could be a function downloadOracleLibs() that would download and unpack a specific version in the sqlectron config directory, then an integration built in db/clients that checks for the presence of the libs before exporting anything.

@GiulianoMarques
Copy link

Hi there, is anyone working on this?

@armarti
Copy link

armarti commented Jan 3, 2019

I’d planned to but after a few hours struggling to get a dockerized oracledb to work I gave up and did something else. I learned some things that I could post later.

@GiulianoMarques
Copy link

I'd like to try,.. is the dockerized part necessary? I have an Ora Express VM running that I indended to use for this.

@maxclaus
Copy link
Member

The docker setup would help other contributors who don't have Oracle setup locally. Also, it would allow running tests for it on CI to make sure new releases don't include bugs to existing code.

@lalloni
Copy link

lalloni commented May 26, 2019

Hey guys, is there a PR or some code to work on for getting this going?

@bmaupin
Copy link

bmaupin commented Nov 26, 2020

For anyone interested in working on this, Oracle has a repo with some instructions on building images here: https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance#readme

For example, you can build an Oracle XE (Express Edition) 18 image like this:

git clone https://github.com/oracle/docker-images.git
cd docker-images/OracleDatabase/SingleInstance/dockerfiles
# Workaround for https://github.com/oracle/docker-images/issues/1797
sed -i 's/yum -y install openssl oracle-database-preinstall-18c/yum -y install expect openssl oracle-database-preinstall-18c/' 18.4.0/Dockerfile.xe
sed -i 's/yum -y localinstall $INSTALL_FILE_1/unbuffer yum -y localinstall $INSTALL_FILE_1/' 18.4.0/Dockerfile.xe
./buildDockerImage.sh -v 18.4.0 -x

Then you can run it like this:

docker run --rm -p 1521:1521 oracle/database:18.4.0-xe

It will generate a password for you and output it near the top of the docker run command, or you can define one using ORACLE_PWD, e.g. docker run -e ORACLE_PWD=changeme ...

Connect using user: system and SID: XE

@MasterOdin MasterOdin transferred this issue from sqlectron/sqlectron-core Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants