Oracle Provider (#1329)

* Added Oracle Provider

* Changed author

* Modified formatting with Black

* Adapt Python Flake8 style

* Adapted line length

* Flake8

* Line length <= 79

* Added Oracle provider into CI/CD

* Changed code style to flake8

* style: tabs to spaces

* style: line length

* style: trailing whitespaces

* Changed dictionary concat to old style

* Fixed skip geometry error.

* Added first set of unit tests

* Deleted whitespaces

* Added Oracle provider documentation

* First version Part 4 (CRUD)

* First version OGC API Feature Part 4 (CRUD)

* Changed style for flake8

* Style: trailing whitespaces

* style: line too long

* style: line too long

* CRUD: Added update

* flake nervt

* CRUD: update + delete

* Added tests + fixed errors

* Updated docs

* Added test_get.. + Error fixing

* Worked reviews in

* Added pull request comments

---------

Co-authored-by: Andreas Kosubek <andreas.kosubek@ama.gv.at>
Co-authored-by: xkosubek <133005275+xkosubek@users.noreply.github.com>
This commit is contained in:
totycro
2023-09-27 13:07:23 +02:00
committed by GitHub
parent afda00e25e
commit ca7f8fc1f6
7 changed files with 3893 additions and 1 deletions
@@ -266,6 +266,54 @@ Here `test` is the name of database , `points` is the target collection name.
data: mongodb://localhost:27017/testdb
collection: testplaces
.. _Oracle:
Oracle
^^^^^^
.. note::
Requires Python package oracledb
.. code-block:: yaml
providers:
- type: feature
name: OracleDB
data:
host: 127.0.0.1
port: 1521 # defaults to 1521 if not provided
service_name: XEPDB1
# sid: XEPDB1
user: geo_test
password: geo_test
# external_auth: wallet
# tns_name: XEPDB1
# tns_admin /opt/oracle/client/network/admin
# init_oracle_client: True
id_field: id
table: lakes
geom_field: geometry
title_field: name
# sql_manipulator: tests.test_oracle_provider.SqlManipulator
# sql_manipulator_options:
# foo: bar
# mandatory_properties:
# - bbox
# source_crs: 31287 # defaults to 4326 if not provided
# target_crs: 31287 # defaults to 4326 if not provided
The provider supports connection over host and port with SID or SERVICE_NAME. For TNS naming, the system
environment variable TNS_ADMIN or the configuration parameter tns_admin must be set.
The providers supports external authentication. At the moment only wallet authentication is implemented.
Sometimes it is necessary to use the Oracle client for the connection. In this case init_oracle_client must be set to True.
The provider supports a SQL-Manipulator-Plugin class. With this, the SQL statement could be manipulated. This is
useful e.g. for authorization at row level or manipulation of the explain plan with hints.
An example an more informations about that feature you can find in the test class in tests/test_oracle_provider.py.
.. _PostgreSQL: