guikaua12 / sql-provider

An SQL provider for applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQL Provider Codacy Badge GitHub stars Open Source Love

SQL provider is a lightweight library to handle SQL operations.

If you would like to use this library as a dependency in your project, you can use maven:

<repository>
    <id>jitpack</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.Jaoow</groupId>
    <artifactId>sql-provider</artifactId>
    <version>1.0</version>
</dependency>

Basic Setup

    // Setup SQLite Connection
    private SQLExecutor setupSQLite() throws SQLException {
        
        SQLiteDatabaseType databaseType = SQLiteDatabaseType.builder()
                .file(new File("databases/database.db"))
                .build();

        return new SQLExecutor(databaseType.connect());
    }

    // Setup MYSQL Connection
    private SQLExecutor setupMySQL() throws SQLException {

        MySQLDatabaseType databaseType = MySQLDatabaseType.builder()
                .address("localhost:3306")
                .database("database")
                .username("root")
                .password("")
                .build();

        return new SQLExecutor(databaseType.connect());
    }

Contributing

SQL Provider is an open source project, and gladly accepts community contributions.


This project was based on sql-provider by HenryFabio with some modifications

About

An SQL provider for applications


Languages

Language:Java 100.0%