Skip to content

Commit e799f4c

Browse files
author
Adam Dupaski
authored
Update with link to documentation
1 parent e40b3a6 commit e799f4c

File tree

1 file changed

+1
-71
lines changed

1 file changed

+1
-71
lines changed

README.md

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1 @@
1-
# Database Connector
2-
3-
The **Database connector** can be used to seamlessly connect to external databases without limiting you in your choice of database or SQL dialect, enabling you to incorporate your external data directly in your Mendix application.
4-
This document will focus on executing an SQL (Structured Query Language) Select Query and executing an SQL Statement on **external relational databases**.
5-
6-
The **Execute query** action (present in the Database connector) provides a consistent environment for Mendix projects to perform an arbitrary Select SQL query on relational external databases. JDBC (Java Database Connectivity) API, a standard Java API,
7-
is used when this Java action attempts to connect with a relational database for which a JDBC driver exists.
8-
9-
The **Execute statement** action (present in the Database connector) internally works in the same manner as **Execute query** action.
10-
However, it is used for INSERT, UPDATE, DELETE, STORED PROCEDURE or DDL statements.
11-
12-
# Dependencies
13-
* [HikariCP](http://brettwooldridge.github.io/HikariCP/), a high-performance JDBC connection pool.
14-
15-
# Installation
16-
### Prerequisities
17-
* A database **URL** address that points to your database.
18-
* The **username** for logging into the database, relative to the database URL address.
19-
* The **password** for logging into the database, relative to the database URL address.
20-
* The **JDBC driver** libraries (.jar extension) (see also [here](#links-to-common-jdbc-drivers)), for the databases you want to connect to, must be placed inside the userlib directory of your Mendix application.
21-
So if you want to connect to Amazon RDS PostgreSQL database (For e.g. *jdbc:postgresql://xyz-rds-instance.ccnapcvoeosh.eu-west-1.rds.amazonaws.com:5432/postgres*),
22-
you need to place PostgreSQL Jdbc driver jar inside the userlib folder.
23-
* **Specific to the Execute query action:**
24-
An entity in the domain model, to be used for the results of the executed query.
25-
Let's say that you want to execute a query like `select name, number from stock`. This query has two columns of type String and Integer respectively. In order to use the Execute query action, you have to add an entity in the domain model that has the same attributes as the columns in the query.
26-
27-
## Installation
28-
Import the module **Database connector** in your project (from the Mendix AppStore or by downloading and exporting the module from this project)
29-
30-
# Getting Started
31-
Once you have imported the DatabaseConnector module in your mendix application, you will have *Database connector* available in the Toolbox. It supports two actions *Execute query* and *Execute statement*.
32-
In order to use any of these in your Mendix application, you can just drag and drop them to your microflow.
33-
Next step would be to provide all the arguments to the selected action and choose the output result name.
34-
35-
### Execute query action
36-
The result of this action is a list of objects of type Row, which is also the output of the SELECT SQL query.
37-
38-
### Execute statement action
39-
The result of this action is either an Integer or a Long value which usually represents the amount of affected rows.
40-
41-
# Remarks
42-
* It is a good practice to avoid having user input as part of your dynamic SQL queries and statements. In the future we will support using parameters with the queries or statements.
43-
* Avoid fetching large amounts of data as it can lead to memory issues because all the ResultSet data is being loaded into memory at once.
44-
45-
# Links to common JDBC drivers
46-
* [Amazon Redshift](http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html#download-jdbc-driver)
47-
* [Apache Derby](http://db.apache.org/derby/derby_downloads.html)
48-
* [Firebird](http://www.firebirdsql.org/en/jdbc-driver/)
49-
* [H2 Database Engine](http://www.h2database.com/)
50-
* [HSQLDB](https://sourceforge.net/projects/hsqldb/files/)
51-
* [IBM DB2](http://www-01.ibm.com/support/docview.wss?uid=swg21385217)
52-
* [IBM Informix](https://www-01.ibm.com/marketing/iwm/tnd/search.jsp?go=y&rs=ifxjdbc)
53-
* [MariaDB](https://downloads.mariadb.org/connector-java/)
54-
* [Microsoft SQL Server/SQL Database](https://www.microsoft.com/en-us/download/details.aspx?id=11774)
55-
* [MySQL](http://dev.mysql.com/downloads/connector/j/)
56-
* [Oracle Database](http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html)
57-
* [OrientDB](https://orientdb.com/download-2/)
58-
* [PostgreSQL](https://jdbc.postgresql.org/download.html)
59-
* [Presto](https://prestodb.io/docs/current/installation/jdbc.html)
60-
* [SQLite](https://bitbucket.org/xerial/sqlite-jdbc/downloads)
61-
62-
# License
63-
Licensed under the Apache license.
64-
65-
# Developers notes
66-
* `git clone https://github.com/mendix/database-connector.git`
67-
* Open the DatabaseConnector.mpr in the Mendix Modeler.
68-
* Use *Deploy for Eclipse* option (F6) and you can then import this module as an Eclipse project to the Eclipse IDE.
69-
70-
# Version history
71-
None
1+
Please see [Database Connector](https://docs.mendix.com/appstore/connectors/database-connector) in the Mendix documentation for details.

0 commit comments

Comments
 (0)