Java Code Examples for org.apache.ibatis.jdbc.SQL#SET
The following examples show how to use
org.apache.ibatis.jdbc.SQL#SET .
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 |
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table user * * @mbg.generated */ public String updateByExampleSelective(Map<String, Object> parameter) { User record = (User) parameter.get("record"); UserCriteria example = (UserCriteria) parameter.get("example"); SQL sql = new SQL(); sql.UPDATE("user"); if (record.getId() != null) { sql.SET("id = #{record.id,jdbcType=INTEGER}"); } if (record.getUsername() != null) { sql.SET("username = #{record.username,jdbcType=VARCHAR}"); } if (record.getPsw() != null) { sql.SET("psw = #{record.psw,jdbcType=VARCHAR}"); } applyWhere(sql, example, true); return sql.toString(); }
Example 2
Source File: UserSqlProvider.java From SpringbootMybatis with Apache License 2.0 | 6 votes |
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table user * * @mbg.generated */ public String updateByPrimaryKeySelective(User record) { SQL sql = new SQL(); sql.UPDATE("user"); if (record.getUsername() != null) { sql.SET("username = #{username,jdbcType=VARCHAR}"); } if (record.getPsw() != null) { sql.SET("psw = #{psw,jdbcType=VARCHAR}"); } sql.WHERE("id = #{id,jdbcType=INTEGER}"); return sql.toString(); }
Example 3
Source File: UserSqlProvider.java From SpringbootMybatis with Apache License 2.0 | 5 votes |
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table user * * @mbg.generated */ public String updateByExample(Map<String, Object> parameter) { SQL sql = new SQL(); sql.UPDATE("user"); sql.SET("id = #{record.id,jdbcType=INTEGER}"); sql.SET("username = #{record.username,jdbcType=VARCHAR}"); sql.SET("psw = #{record.psw,jdbcType=VARCHAR}"); UserCriteria example = (UserCriteria) parameter.get("example"); applyWhere(sql, example, true); return sql.toString(); }
Example 4
Source File: OracleTool.java From maintain with MIT License | 4 votes |
public static void set(SQL sql, String column, String value) { sql.SET(column + " = " + (null == value ? "null" : toString(value))); }
Example 5
Source File: OracleTool.java From maintain with MIT License | 4 votes |
public static void set(SQL sql, String column, Double value) { sql.SET(column + " = " + (null == value ? "null" : value)); }
Example 6
Source File: OracleTool.java From maintain with MIT License | 4 votes |
public static void set(SQL sql, String column, Integer value) { sql.SET(column + " = " + (null == value ? "null" : value)); }
Example 7
Source File: OracleTool.java From maintain with MIT License | 4 votes |
public static void set(SQL sql, String column, Long value) { sql.SET(column + " = " + (null == value ? "null" : value)); }
Example 8
Source File: OracleTool.java From maintain with MIT License | 4 votes |
public static void set(SQL sql, String column, Date value) { sql.SET(column + " = " + (null == value ? "null" : toString(value))); }