External Database Sources
base_external_dbsource · OCA/server-backend
OCA/server-tools 7.0–10.0 → OCA/server-backend 11.0–19.0
Health
90/100
good
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by15/251 module depends on it
-
Maturity25/25In 13 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.5 MB
Module directory on disk
Code analysis
0 migration notes
1 model
2 views
0 HTTP endpoints
Description
This module allows you to define connections to foreign databases using ODBC, Firebird, Oracle Client or SQLAlchemy.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_dbsource_form |
base.external.dbsource.form | base.external.dbsource | form | New |
view_dbsource_tree |
base.external.dbsource.list | base.external.dbsource | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
New fields (9)
-
ca_certsCharhelp='Path to CA Certs file on server.' -
client_certText -
client_keyText -
company_idMany2one → res.companycomodel_name='res.company'default=<expr> -
conn_stringTexthelp="\n Sample connection strings:\n - Microsoft SQL Server:\n mssql+pymssql://username:%s@server:port/dbname?charset=utf8\n - MySQL: mysql://user:%s@server:port/dbname\n - ODBC: DRIVER={FreeTDS};SERVER=server.address;Database=mydb;UID=sa\n - ORACLE: username/%s@//server.address:port/instance\n - PostgreSQL:\n dbname='template1' user='dbuser' host='localhost' port='5432' password=%s\n - SQLite: sqlite:///test.db\n - Elasticsearch: https://user:%s@localhost:9200\n " args: 'Connection string' -
conn_string_fullTextcompute='_compute_conn_string_full'readonly=True -
connectorSelectionhelp='If a connector is missing from the list, check the server log to confirm that the required components were detected.'required=True args: CONNECTORS -
nameCharrequired=True args: 'Datasource name' -
passwordChar
-
change_table(self, name)Change the table that is used for CRUD operations -
conn_open(self)It opens and returns a connection to the remote data source. This method calls adapter method of this same name, suffixed with the adapter type. Deprecate: This method has been replaced with ``connection_open``. -
connection_close(self, connection)It closes the connection to the data source. This method calls adapter method of this same name, suffixed with the adapter type. -
connection_close_postgresql(self, connection) -
connection_open(self)@contextmanagerIt provides a context manager for the data source. This method calls adapter method of this same name, suffixed with the adapter type. -
connection_open_postgresql(self) -
connection_test(self)It tests the connection Raises: Validation message with the result of the connection (fail or success) -
current_table(self)@property -
execute(self, query=None, execute_params=None, metadata=False, **kwargs)Executes a query and returns a list of rows. "execute_params" can be a dict of values, that can be referenced in the SQL statement using "%(key)s" or, in the case of Oracle, ":key". Example: query = "SELECT * FROM mytable WHERE city = %(city)s AND date > %(dt)s" execute_params = { 'city': 'Lisbon', 'dt': datetime.datetime(2000, 12, 31), } If metadata=True, it will instead return a dict containing the rows list and the columns list, in the format: { 'cols': [ 'col_a', 'col_b', ...] , 'rows': [ (a0, b0, ...), (a1, b1, ...), ...] } -
execute_postgresql(self, query, params, metadata) -
remote_browse(self, record_ids, *args, **kwargs)It browses for and returns the records from remote by ID This method calls adapter method of this same name, suffixed with the adapter type. Args: record_ids: (list) List of remote IDs to browse. *args: Positional arguments to be passed to adapter method. **kwargs: Keyword arguments to be passed to adapter method. Returns: (iter) Iterator of record mappings that match the ID. -
remote_create(self, vals, *args, **kwargs)It creates a record on the remote data source. This method calls adapter method of this same name, suffixed with the adapter type. Args: vals: (dict) Values to use for creation. *args: Positional arguments to be passed to adapter method. **kwargs: Keyword arguments to be passed to adapter method. Returns: (mapping) A mapping of the record that was created. -
remote_delete(self, record_ids, *args, **kwargs)It deletes records by ID on remote This method calls adapter method of this same name, suffixed with the adapter type. Args: record_ids: (list) List of remote IDs to delete. *args: Positional arguments to be passed to adapter method. **kwargs: Keyword arguments to be passed to adapter method. Returns: (iter) Iterator of bools indicating delete status. -
remote_search(self, query, *args, **kwargs)It searches the remote for the query. This method calls adapter method of this same name, suffixed with the adapter type. Args: query: (mixed) Query domain as required by the adapter. *args: Positional arguments to be passed to adapter method. **kwargs: Keyword arguments to be passed to adapter method. Returns: (iter) Iterator of record mappings that match query. -
remote_update(self, record_ids, vals, *args, **kwargs)It updates the remote records with the vals This method calls adapter method of this same name, suffixed with the adapter type. Args: record_ids: (list) List of remote IDs to delete. *args: Positional arguments to be passed to adapter method. **kwargs: Keyword arguments to be passed to adapter method. Returns: (iter) Iterator of record mappings that were updated.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…