Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Oracle Features
Uppercase
Naming system tables and fields in uppercase (at least in version 11). In SQL queries, lowercase can be used, but the returned arrays will have uppercase.
Schemas
In Oracle, there's a concept called schema and by default, every user upon connection has access to a schema with the username. The work with schemas from the Postgres driver was used as a basis, as it is more similar to Oracle.
By default, after launching a Docker container, the user SYSTEM is available and it has a bunch of system tables. This feature can complicate testing the retrieval of the entire table list through
getTableNames
.Auto increment
In Oracle DB, auto increment is implemented through Sequences. It's necessary to create a Sequence, name it, and when adding a new record to the DB, specify which field should use which Sequence. There's no direct link between the table field and the sequence, i.e., it's impossible to know which field corresponds to which sequence.
Creating a Sequence
Inserting a row into the DB
Detailed example here
Column types
Oracle has its own typing for fields. You can view the list of types, for instance, here. Pay attention to this when mapping.
LIMIT OFFSET
In Oracle, working with LIMIT OFFSET is similar to the SqlServer driver.
Sample
Note the syntax as there are variations.
SELECT ... FOR UPDATE
The SELECT FOR UPDATE command allows you to lock the records in the resulting cursor set. The record lock is released when the following commit or rollback commands are executed.
Foreign keys
As far as I understood, in version 11 of Oracle DB, there is no possibility to use
ON UPDATE
, instead triggers are suggested.Drop constraint drop index
Dropping an index with constraint is allowable as follows
There might be other specific things, possibly from version 11 Oracle added a bunch of innovations and it's worth updating the Docker container to the latest version. The current version is 21c.