类 SqlUtilsExt


  • public class SqlUtilsExt
    extends Object
    版本:
    v1.0,Date:2015年4月22日
    作者:
    zhongxuchen
    • 方法详细资料

      • batchUpdateForPOJO

        public static Long batchUpdateForPOJO​(TypeHandler typeHandler,
                                              String updateSql,
                                              List<Object[]> rowDatas,
                                              Integer[] fieldsType,
                                              String[] fieldsDefaultValue,
                                              Boolean[] fieldsNullable,
                                              int batchSize,
                                              Boolean autoCommit,
                                              Connection conn,
                                              Integer dbType)
                                       throws Exception
        参数:
        typeHandler -
        updateSql -
        rowDatas -
        fieldsType -
        fieldsDefaultValue -
        fieldsNullable -
        batchSize -
        autoCommit -
        conn -
        dbType -
        返回:
        抛出:
        Exception
      • getDefaultValues

        public static Object[] getDefaultValues​(EntityMeta entityMeta)
        参数:
        entityMeta -
        返回:
      • getDefaultValue

        public static Object getDefaultValue​(Object paramValue,
                                             String defaultValue,
                                             int jdbcType,
                                             boolean nullable)
        参数:
        paramValue -
        defaultValue -
        jdbcType -
        nullable -
        返回:
      • isCurrentTime

        public static boolean isCurrentTime​(String defaultValue)
      • signSql

        public static String signSql​(String sql,
                                     Integer dbType,
                                     SqlToyConfig sqlToyConfig)
        参数:
        sql -
        dbType - 传递过来具体数据库类型,便于对不支持的数据库做区别处理
        sqlToyConfig -
        返回:
      • markOriginalSql

        public static String markOriginalSql​(String originalSql)
        参数:
        originalSql -
        返回:
      • clearOriginalSqlMark

        public static String clearOriginalSqlMark​(String sql)
        参数:
        sql -
        返回: