10 2021 档案
go-pg库操作PostgreSQL小结
摘要:重要的参考资料 GO-PG Golang Postgre ORM *** 这里有详细的关于ORM操作的需求 PostgreSQL client and ORM for Go 自己做的练习 package gp_gp_tests import ( "github.com/go-pg/pg/v10" " 阅读全文
posted @ 2021-10-26 10:33 江湖乄夜雨 阅读(789) 评论(0) 推荐(0)
Python与Golang中实现单例模式
摘要:Python中重写__new__方法实现 import threading import configs class Util(object): _lock = threading.Lock() def __init__(self, host, port): self.host = host sel 阅读全文
posted @ 2021-10-24 12:13 江湖乄夜雨 阅读(82) 评论(0) 推荐(0)
MySQL与PostgreSQL中解决插入主键冲突的方法
摘要:PostgreSQL的案例 注意:on conflict do 语法,是在postgresql9.5版本推出的!,之前的版本不兼容!PostgreSQL upsert功能(insert on conflict do)的用法 安装及配置pgcli工具 # brew安装 brew install pgc 阅读全文
posted @ 2021-10-17 10:30 江湖乄夜雨 阅读(1613) 评论(0) 推荐(0)