diff --git a/src/main/java/org/teasoft/bee/osql/PreparedSql.java b/src/main/java/org/teasoft/bee/osql/PreparedSql.java index e754b8910a0bc559e07bf2e32be240818be0c3ec..ce4aefb4b3e75c3e4e13f9e9060e363f2fea7b51 100644 --- a/src/main/java/org/teasoft/bee/osql/PreparedSql.java +++ b/src/main/java/org/teasoft/bee/osql/PreparedSql.java @@ -21,8 +21,8 @@ import java.util.List; import java.util.Map; /** - * 支持带占位符的sql操作.sql语句是DB能识别的SQL,非面向对象的sql.Support sql string - * with placeholder.The sql statement is really DB's grammar,not object oriented type. + * 支持带占位符的sql操作.sql语句是DB能识别的SQL,非面向对象的sql + *
Support sql string with placeholder.The sql statement is really DB's grammar,not object oriented type. *

支持的占位符有:? 或者 #{para} 或者 #{para%}, 都可以通过PreparedStatement防范SQL注入攻击. *
Support placeholder ? or #{para} or #{para%} *

若是可以,建议使用面向对象的操作方式,如:Suid和SuidRich,可以使用Bee缓存,获取更高的查询效率. diff --git a/src/main/java/org/teasoft/bee/osql/Suid.java b/src/main/java/org/teasoft/bee/osql/Suid.java index c87de69ab816af26c32a05449a1a7114107bc48a..cb9fed921c2a0db79457bd1f9a861ceddad3b41e 100644 --- a/src/main/java/org/teasoft/bee/osql/Suid.java +++ b/src/main/java/org/teasoft/bee/osql/Suid.java @@ -85,7 +85,7 @@ public interface Suid { * @param entity 与表对应的实体对象,且不能为空. table's entity(do not allow null). * @param condition entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.
* If the field of entity is not null or empty, it will be translate to field=value.Other can define with condition. - * 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.) + *
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.) * @return 可包含多个实体(多条记录)的list. list which contains more than one entity. * @since 1.6 */ @@ -98,7 +98,7 @@ public interface Suid { * @param entity 与表对应的实体对象,且不能为空. table's entity(do not allow null). * @param condition entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.
* If the field of entity is not null or empty, it will be translate to field=value.Other can define with condition. - * 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.) + *
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.) * @return 成功删除的记录行数. the number of deleted record(s) successfully. * @since 1.7.2 */