https://github.com/samuel-ricardo/connectionfactory
Library whose main objective is to generate connections to databases compatible with Java, for each bank there is a class with unit tests that guarantees consistency and quality.
https://github.com/samuel-ricardo/connectionfactory
apache-maven connectionfactory database database-connection database-connections database-connector java maven maven-project mongodb mysql nosql postgresql slqserver sql sql-server sqlite
Last synced: 4 months ago
JSON representation
Library whose main objective is to generate connections to databases compatible with Java, for each bank there is a class with unit tests that guarantees consistency and quality.
- Host: GitHub
- URL: https://github.com/samuel-ricardo/connectionfactory
- Owner: Samuel-Ricardo
- License: gpl-3.0
- Created: 2021-01-06T19:44:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T03:30:44.000Z (about 5 years ago)
- Last Synced: 2025-05-09T01:48:35.152Z (9 months ago)
- Topics: apache-maven, connectionfactory, database, database-connection, database-connections, database-connector, java, maven, maven-project, mongodb, mysql, nosql, postgresql, slqserver, sql, sql-server, sqlite
- Language: Java
- Homepage: https://samuel-ricardo.github.io/Javadoc-ConnectionFactory.github.io/
- Size: 147 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ConnectionFactory
[](https://github.com/Samuel-Ricardo)
[](https://www.linkedin.com/in/samuel-ricardo-cabral/)
[](https://github.com/Samuel-Ricardo/ConnectionFactory/blob/master/LICENSE)
[](https://www.oracle.com/java/technologies/)
[](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html)
[](https://maven.apache.org/)
[](https://www.mysql.com/)


[](https://samuel-ricardo.github.io/Javadoc-ConnectionFactory.github.io/)
#
Library whose main objective is to generate connections to databases compatible with Java, for each bank there is a class with unit tests that guarantees consistency and quality.
The first version includes a connection to the [MySQL](https://www.mysql.com/)
For the next versions are planned connections with:
- [MongoDB](https://www.mongodb.com/),
- [PostgreSQL](https://www.postgresql.org/),
- [SQLite](https://www.sqlite.org/index.html),
- [SQLServer](https://www.microsoft.com/pt-br/sql-server/sql-server-downloads)
- __Documentation: [Javadoc](https://samuel-ricardo.github.io/Javadoc-ConnectionFactory.github.io/)__
# __*General Information:*__
- __*Author:*__ [Samuel Ricardo Cabral de Barros](https://github.com/Samuel-Ricardo)
- __*Documentation:* [Javadoc](https://samuel-ricardo.github.io/Javadoc-ConnectionFactory.github.io/)__
- __*Created:* 01/2021__
- __*Last update:* 01/2021__
- __*State:*__ In Progress
- __*Current version:*__ 1.0.0
- __*License:*__ [GNU General Public License v3.0](https://github.com/Samuel-Ricardo/ConnectionFactory/blob/master/LICENSE)
# To Use the Library
## Maven Project:
1. If you are working with a Maven project, look for the `pom.xml` file in your Maven project
2. Inside this file, look for the tag:
``` XML
```
3. And paste this code snippet into it...
``` XML
com.samuel.cabral
ConnectionFactory
1.0.0
```
2-1. If you don't have this tag in your pom.xml, paste this snippet at the end of the code before the tag `< /project >`:
``` XML
com.samuel.cabral
ConnectionFactory
1.0.0
```
4. After doing this, execute the `build` in your application and it will be ready to be used with all dependencies installed...
## Project without Maven
- If your project is not Maven and you prefer to download it ...
1. download this file: [ConnectionFactory-1.0.0.jar](https://github.com/Samuel-Ricardo/ConnectionFactory/blob/master/Lib/ConnectionFactory-1.0.0.jar?raw=true)
2. After downloading, add the downloaded file to your project.
__*WARNING*: Remember, when choosing this method you should download the JDBC and add it to your project, I will leave a list with the JDBC of the databases compatible with this version and the download links:__
- MySQL - [MySQLConnector 8.0.22](https://dev.mysql.com/downloads/connector/j/?os=26)
# How to create a connection:
- MySQL:
1. Import the MySQLConnectionFactory class:
```Java
import static com.MySQL.Connection.MySQLConnectionFactory.*;
```
2. now call the `getConnection (...)` method, the method will connect to the database and return a Connection
3. When you want to close a connection, call the `closeConnection (...)` method