Querying the Database

Writing the data

Other Usage

Misc

🔧 Setup SqlMan

Requirements

Java

SqlMan runs on Java 8+.

Supported Databases

Connecting to your database

Normally, you just tell Sqlman either a DataSource or a Connection to work. These're standard JDBC object that contain the connection information of database like URL, username, password, etc.

Connection conn = JdbcConnection.getConnection("jdbc:mysql://localhost:3306/test", "root", "psw");
Map<String, Object> result = new Sql(conn).input("SELECT * FROM shop_address").query(); // fetch the first one

The code above is hardcoded, which is ONLY for demo/test purposes. In real world, you should use a connection pool to manage your connections.

Config in Spring

TODO