Skip to content

ly641921791/swift-all

Repository files navigation

swift

The name swift comes from the logo of MyBatis, the Swifttail. It can get the usual CURD functionality through inheritance like Jpa.

how to use

table

CREATE TABLE foo (
  id BIGINT NOT NULL AUTO_INCREMENT COMMENT 'id',
  string_value VARCHAR (64) ,
  del TINYINT NOT NULL DEFAULT 0 COMMENT 'del_flag',
  PRIMARY KEY (id)
);

JavaBean

User

@Data
public class Foo {
    private Long id;
    private String stringValue;
    private Integer del;
}

mapper

@Mapper
public interface FooMapper extends BaseMapper<Foo, Long> {
}

Swift will generate MapperStatement based on JavaBean. The default rule is to replace the hump rule with an underscore rule.

For example:

Foo -> foo id -> id stringValue -> string_value del -> del

About

Database component based on MyBatis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages