-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add Oracle backend support #45
base: master
Are you sure you want to change the base?
Add Oracle backend support #45
Conversation
I knew I had it coming. The nightmares of dealing with PL/SQL back in the days...are coming back to haunt me here. On a bright side this thing is kind of working. I was able to get a connection to the autonomous database, but just as I said I ran into SQL issues. One of the most significant thing here is that you need to replace And another one is that Oracle Database...doesn't really have a built-in boolean types. While the statement did found out the token "true" to be a BOOLEAN, it was expecting a NUMBER instead, so it is not coerced by default LUL. I also want to mention that Otherwise I think this is pretty okay. |
func setup(db *sql.DB) error { | ||
var str strings.Builder | ||
|
||
for _, cmd := range procedureTemplate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am only lightly versed in oracle's SQL dialect, but why is it necessary to wrap all the queries in a templated procedure wrapper? Is that the only way to keep errors from messing up the connection state or something?
This could be good. Sadly we don't have a test suite so I can't validate my work |
Any chance of this moving forward? Oracle has an Always Free tier in their cloud offering, which includes enough VMs to build a small cluster. They also offer a free Autonomous database, which would be excellent to use as the datastore for k3s, freeing up a VM which would otherwise be used for mysql or postgresql. |
Is this PR still relevant? |
Well, let's hope that the "generic" interface is really generic enough for Oracle, one of the most egregious database system to date.
I've created this PR for...well you know Oracle offered free autonomous database and I don't want to miss a single opportunity to suck off those bastards. This also means this patch is potentially only for 19c and upwards.
But TBH I think using an ORM is a much better choice if you really want to generalize these cliche database difference. I suggest using GORM, and this could be another PR if I would like to work out the internal structure of this project.
Oh, If this gets patched I will keep on adding it to k3s too. That's actually my ultimate goal.