https://github.com/wavemaker/mongodb-connector
https://github.com/wavemaker/mongodb-connector
wavemaker-connector
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wavemaker/mongodb-connector
- Owner: wavemaker
- Created: 2020-07-02T09:39:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T06:47:44.000Z (over 1 year ago)
- Last Synced: 2025-06-22T12:07:21.393Z (9 months ago)
- Topics: wavemaker-connector
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Connector Introduction
Connector is a Java based backend extension for WaveMaker applications. Connectors are built as Java modules & exposes java based SDK to interact with the connector implementation.
Each connector is built for a specific purpose and can be integrated with one of the external services. Connectors are imported & used in the WaveMaker application. Each connector runs on its own container thereby providing the ability to have it’s own version of the third party dependencies.
## Features of Connectors
1. Connector is a java based extension which can be integrated with external services and reused in many Wavemaker applications.
1. Each connector can work as an SDK for an external system.
1. Connectors can be imported once in a WaveMaker application and used many times in the applications by creating multiple instances.
1. Connectors are executed in its own container in the WaveMaker application, as a result there are no dependency version conflict issues between connectors.
## About mongodb Connector
## Introduction
MongoDB is an open-source document database and leading NoSQL database.MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document.
This connector exposes api to connect Mongo db and do all CRUD, query operations on database from WaveMaker application.
## Prerequisite
1. Mogogo DB
1. Java 1.8 or above
1. Maven 3.1.0 or above
1. Any java editor such as Eclipse, Intelij..etc
1. Internet connection
## Build
You can build this connector using following command
```
mvn clean install
```
## Deploy
You can import connector dist/mongodb.zip artifact in WaveMaker studio application using file upload option.On after uploading into wavemaker, you can update your profile properties such as mongodb host, post and credentials.
## Use Mongodb connector in WaveMaker
```
@Autowired
private MongoDBConnector mongoDBConnector;
String collectionName = "employee";
mongoDBConnector.createCollection(collectionName);
Employee employee = new Employee();
employee.setEmpId(106);
employee.setEmpName("Bobs");
employee.setEmpdesignation("Eng");
mongoDBConnector.addDocument(collectionName, employee);
Employee emp = (Employee) mongoDBConnector.findDocument(collectionName, eq("empid", 106), Employee.class);
Assert.assertEquals("Employee name is not matching", "Bobs", emp.getEmpName());
```
Apart from above apis, there are multiple apis exposed in this connector to intract with mongo database.Please visit connector interface in api module.