通过catlet支持跨分片复杂SQL实现以及存储过程支持等。使用方式主要通过mycat注释的方式来执行,如下:
1. 跨分片联合查询注解支持:
/*!mycat:catlet=demo.catlets.ShareJoin / select bu.,sg.* from base_user bu,sam_glucose sg where bu.id_=sg.user_id;
注:sam_glucose 是跨分片表;
2. 存储过程注解支持:
/*!mycat: sql=select * from base_user where id_=1;*/ CALL proc_test();
注:目前执行存储过程通过mycat注解的方式执行,注意需要把存储过程中的sql写到注解中;
3. 批量插入与ID自增长结合的支持: