Configuring DB Connector – MariaDB

DronaHQ Studio enables you to use databases by configuring their connectors and now MariaDB Connector is available in the studio.

MariaDB is open-source software. It is a form of relational database and it provides an SQL interface for accessing data. MariaDB is a relational database management system. It stores data in various tables. It is a drop-in replacement for MySQL.

Configuring a MariaDB connector

To add a third-party DB connector, under Studio > Connectors, click (+) Connector. Select MariaDB connector.

Enter the Connector Name.

The most important part of the process is to provide the connection string. It will be dependent upon the different types of relational databases that you might want to use.
Now let us configure our MariaDB database connector. You would now need to add the Connection string or the different fields required to establish a database connection.

In this case, note that to connect to the MariaDB database you would need a few parameters or fields. The connection parameters that are required are Host and database name. Add the other configuration details for Port, Username, and Password, also Authentication Type.

Authentic Type: Under this dropdown, you can select from two available authentication types: User and Password & AWS IAM Authentication.

Once these configurations are added, click Test connection. If the authentication is successful, you will get a response accordingly. Click to Save your configuration.

Adding Queries to MariaDB connector

Now that you have configured the connector you will find it under the Custom Database connectors list. Further to fetch data or undertake any other action, click the Add query option available after your connection is ready.

Here you can add your queries - simple as well as complex ones. On the right-hand side of the screen, you can see the list of tables from the database. You can expand the tables to view the fields from the table.

To use a dynamic variable in a query, you simply need to put it into double Curly brackets. You can add a sample value to test your query before saving it. When using the connector queries the dynamic variables would have to be linked to the respective control for further run-time functioning.

You can now view the queries that you saved for use in your apps later under your specific connector under Custom Database connectors.

Using MariaDB connector

Fetch all data

Now let us take a simple example to fetch all rows from the table and display them in a table grid control. In this case, you simply need to add the query as per the MariaDB syntax (similar to MySQL)

Add the query as seen above and run to verify the output. Once done Save the query.
Now, whenever you need to get data from MariaDB you can use the connector query anytime within your apps. Now if you want to display the details in a tablegrid control you simply need to add the connector to the app and then bind the connector in the respective control’s properties (tablegrid in this case).

Beyond the configured queries, if you feel the need to have a few more queries you can use the Add Query option.