Java Code Examples for org.apache.ibatis.jdbc.SQL#VALUES

The following examples show how to use org.apache.ibatis.jdbc.SQL#VALUES . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserSqlProvider.java    From SpringbootMybatis with Apache License 2.0 6 votes vote down vote up
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table user
 *
 * @mbg.generated
 */
public String insertSelective(User record) {
    SQL sql = new SQL();
    sql.INSERT_INTO("user");
    
    if (record.getId() != null) {
        sql.VALUES("id", "#{id,jdbcType=INTEGER}");
    }
    
    if (record.getUsername() != null) {
        sql.VALUES("username", "#{username,jdbcType=VARCHAR}");
    }
    
    if (record.getPsw() != null) {
        sql.VALUES("psw", "#{psw,jdbcType=VARCHAR}");
    }
    
    return sql.toString();
}
 
Example 2
Source File: OracleTool.java    From maintain with MIT License 4 votes vote down vote up
public static void values(SQL sql, String column, String value) {
	if (!StringUtils.isEmpty(value)) {
		sql.VALUES(column, toString(value));
	}
}
 
Example 3
Source File: OracleTool.java    From maintain with MIT License 4 votes vote down vote up
public static void values(SQL sql, String column, Integer value) {
	if (null != value) {
		sql.VALUES(column, toString(value));
	}
}
 
Example 4
Source File: OracleTool.java    From maintain with MIT License 4 votes vote down vote up
public static void values(SQL sql, String column, Long value) {
	if (null != value) {
		sql.VALUES(column, toString(value));
	}
}
 
Example 5
Source File: OracleTool.java    From maintain with MIT License 4 votes vote down vote up
public static void values(SQL sql, String column, Double value) {
	if (null != value) {
		sql.VALUES(column, toString(value));
	}
}
 
Example 6
Source File: OracleTool.java    From maintain with MIT License 4 votes vote down vote up
public static void values(SQL sql, String column, Date date) {
	if (null != date) {
		sql.VALUES(column, toString(date));
	}
}