All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jeesuite.mybatis.crud.builder.SqlTemplate Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/**
 * 
 */
package com.jeesuite.mybatis.crud.builder;

/**
 * @description 
* @author vakin * @date 2016年10月25日 */ public class SqlTemplate { public static final String IF_TAG_TEAMPLATE = "%s,"; public static final String SCRIPT_TEMAPLATE = ""; public static final String TRIM_PREFIX = "\n"; public static final String TRIM_SUFFIX = ""; public static final String INSERT = "INSERT INTO %s \n %s \n VALUES \n %s"; public static final String UPDATE_BY_KEY = "UPDATE %s %s \n WHERE %s = #{%s}"; public static final String BATCH_INSERT = "INSERT INTO %s \n %s \n VALUES \n %s"; public static String wrapIfTag(String fieldName,String expr,boolean skip){ if(skip)return expr; return String.format(IF_TAG_TEAMPLATE, fieldName,expr); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy