|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.vsame.url2sql.helper.SqlHelper
public class SqlHelper
Sql工具, ${}中占位符值按优先级排列如下:
Sql Example: select * from student where id in(${ids})
| 嵌套类摘要 | |
|---|---|
static interface |
SqlHelper.CustomTag
自定义标签使用时${~tag:param1:param2:param3} |
| 构造方法摘要 | |
|---|---|
SqlHelper()
|
|
| 方法摘要 | |
|---|---|
static List<String> |
alltables()
|
static int |
execute(String sql,
Object... objects)
执行Sql,返回影响的条数 |
static Long |
executeGeneratedKey(String sql,
Object... objects)
执行Sql,返回自动生成的列,比如主健(GENERATED_KEY),时间 |
static net.vsame.url2sql.helper.SqlHelper.Option |
getCommOption(String sql,
Object... objects)
Sql工具, ${}中占位符值按优先级排列如下: 从传递MAP取, 当然也可以不传 从request.getParameterMap();取 从url中rest参数取,注意写法为${0} Sql Example: select * from student where id in(${ids}) |
static void |
main(String[] args)
|
static void |
main2(String[] args)
|
static PageView |
page(int currentpage,
int pagesize,
String sql,
Object... objects)
分页 |
static PageView |
page(String sql,
Object... objects)
分页 |
static List<Model> |
query(String sql,
Object... objects)
查询多个 |
static Model |
queryOne(String sql,
Object... objects)
查询一个 |
static void |
registCustomTag(SqlHelper.CustomTag customTag)
|
static Object[] |
toObjectArray(Object obj)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public SqlHelper()
| 方法详细信息 |
|---|
public static void registCustomTag(SqlHelper.CustomTag customTag)
public static Object[] toObjectArray(Object obj)
public static net.vsame.url2sql.helper.SqlHelper.Option getCommOption(String sql,
Object... objects)
Sql Example: select * from student where id in(${ids})
sql - objects -
public static List<Model> query(String sql,
Object... objects)
sql - objects -
public static PageView page(int currentpage,
int pagesize,
String sql,
Object... objects)
currentpage - 当前页pagesize - 每页显示数sql -
public static PageView page(String sql,
Object... objects)
sql -
public static Model queryOne(String sql,
Object... objects)
sql - objects -
public static int execute(String sql,
Object... objects)
sql - objects -
public static Long executeGeneratedKey(String sql,
Object... objects)
sql - objects -
public static List<String> alltables()
public static void main(String[] args)
public static void main2(String[] args)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||