zohar-soul / quarkus-mybatis

Quarkus MyBatis Extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quarkus MyBatis Extension

Build License Central

All Contributors

MyBatis is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings. This extension provides the developers ease of configuration and native support. Add the following dependency in your pom.xml to get started,

<dependency>
    <groupId>io.quarkiverse.mybatis</groupId>
    <artifactId>quarkus-mybatis</artifactId>
</dependency>

And then your can use the @Mapper in your application just like

@Mapper
public interface UserMapper {

    @Select("SELECT * FROM USERS WHERE id = #{id}")
    User getUser(Integer id);

    @Insert("INSERT INTO USERS (id, name) VALUES (#{id}, #{name})")
    Integer createUser(@Param("id") Integer id, @Param("name") String name);

    @Delete("DELETE FROM USERS WHERE id = #{id}")
    Integer removeUser(Integer id);
}

For more information and quickstart, you can check the complete documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Amos Feng

πŸ’» 🚧

Chao

πŸ’»

Viktor Ilvovskyi

πŸ’»

Igor Dmitriev

πŸ’»

Ken Brumer

πŸ’»

Zohar

🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

ezoic increase your site revenue

About

Quarkus MyBatis Extension

License:Apache License 2.0


Languages

Language:Java 100.0%