| 2019.5.10 | h2db |
创建一个UUID函数
package h2db.function.ext;
import java.util.UUID;
/**
* @ClassName: H2DBFunctionExt
* @Description: 针对H2数据库函数的扩展
* @author: 孤傲苍狼
* @date: 2014-12-20 下午11:20:34
*
*/
public class H2DBFunctionExt {
/**
* 用法:SELECT uuid();
* H2数据库注册uuid函数:CREATE ALIAS uuid FOR "h2db.function.ext.H2DBFunctionExt.uuid";
* @Method: uuid
* @Description: 实现MySQL数据库的uuid函数,用于生成UUID
* @Anthor:孤傲苍狼
*
* @return
*/
public static String uuid(){
return UUID.randomUUID().toString();
}
}
CREATE ALIAS UUID FOR"h2db.function.ext.H2DBFunctionExt.uuid"
更新列表:
参考文章: