Package cn.dinodev.spring.data.sql
Interface SqlBuilder
- All Known Implementing Classes:
DeleteSqlBuilder,InsertSqlBuilder,SelectSqlBuilder,UpdateSqlBuilder,WhereSql
public interface SqlBuilder
- Author:
- Cody Lu
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringBuilderappendList(StringBuilder sql, List<?> list, String start, String sep) Constructs a list of items with given separators.default StringBuilderappendList(StringBuilder sql, List<?> list, String start, String sep, String end) Constructs a list of items with given separators.Object[]获取sql语句需要的参数数组getSql()获取生成的sql语句
-
Method Details
-
getSql
String getSql()获取生成的sql语句- Returns:
-
getParams
Object[] getParams()获取sql语句需要的参数数组- Returns:
-
appendList
default StringBuilder appendList(StringBuilder sql, List<?> list, String start, String sep, String end) Constructs a list of items with given separators.- Parameters:
sql- StringBuilder to which the constructed string will be appended.list- List of objects (usually strings) to join.start- String to be added to the start of the list, before any of theitems.
sep- Separator string to be added between items in the list.end- String to be append to the end of the list, after all of theitems.
- Returns:
-
appendList
Constructs a list of items with given separators.- Parameters:
sql-list-start-sep-- Returns:
-