Clojure:解决korma中mysql utf8的问题
2024-08-31 02:22:49
当使用korma内置的mysql方法时,无法添加utf-8的支持。解决的方法就是重写mysql方法,代码如下:
(defn mysql
"改编自korma,添加了utf-8的支持"
[{:keys [host port db make-pool?]
:or {host "localhost", port 3306, db "", make-pool? true}
:as opts}]
(merge {:classname "com.mysql.jdbc.Driver" ; must be in classpath
:subprotocol "mysql"
:subname (str "//" host ":" port "/" db "?useUnicode=true&characterEncoding=UTF-8")
:delimiters "`"
:make-pool? make-pool?}
opts))
最新文章
- SQL SERVER 多数据导入
- .NET导入导出Excel方法总结
- Matlab中给figure添加图例(legend),标题(title)和颜色(color)
- mobile cpu上禁用alpha test的相关总结
- 图片lightbox2
- PHP通过字符串调用函数
- 360网站卫士推出google字体加速方案
- 第三百二十七天 how can I 坚持
- 关于oozie
- spring aop原理分析
- bootstrap基础样式使用
- assign retain copy
- WebViewJavascriptBridge详细使用
- git分支综述
- MySQL索引背后的之使用策略及优化(高性能索引策略)
- Mysql的JDBC
- 单表ORM框架
- linux:你不知道的echo
- shell date命令
- vue+vue-cli+淘宝lib-flexible做移动端自适应
热门文章
- [Apple开发者帐户帮助]六、配置应用服务(5.2)推送通知(APN):使用TLS证书与APN通信
- HTTP Status 500 - Could not write content: could not initialize proxy - no Session
- Winform中Treeview控件失去焦点,将选择的节点设置为高亮显示 (2012-07-16 13:47:07)转载▼
- 6.10---springboot的配置
- C语言常量
- [Android]异常5-throwable:java.lang.OutOfMemoryError: pthread_create
- 影响ERP成功实施的因素及实施方法
- 使用doxmate生成文档
- 显示log里的ansi codecs颜色字符
- C#鸡翁百鸡