
Postgresql
Johan.
关注前沿技术,并致力于开源社区与微软平台的组合优化;有多年大数据高并发实践经验、对精简代码并行程序开发、代码美感以及程序员能力修养等相关问题也有着浓厚的兴趣;
展开
-
CentOS 8 安装 PostgreSQL 10
# Install the repository RPM:sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm# 禁用内置的 PostgreSQL模块# Disable the built-in PostgreSQL module:sudo dnf -qy module disable postg...原创 2020-12-01 14:42:39 · 2330 阅读 · 0 评论 -
深入浅出-应用服务
应用服务实现应用程序的用例, 将领域层逻辑公开给表示层.从表示层(可选)调用应用服务,DTO (数据传对象)作为参数. 返回(可选)DTO给表示层.示例图书实体假设你有一个Book实体(聚合根), 如下所示:public class Book : AggregateRoot<Guid>{ public const int MaxNameLength = 128; public virtual string Name { get; protected s.转载 2020-06-02 16:52:44 · 527 阅读 · 0 评论 -
Postgresql 通过 While 循环插入测试数据
需要大批量测试数据时可能会用到SQL批量新增的方法。DO $$DECLAREi INTEGER := 1;identityId BIGINT := 200000000001;BEGIN WHILE i < 100 LOOP identityId = identityId + 1; -- INSERT 语句 -- 将字符串转为 uuid ca...原创 2019-11-26 15:22:54 · 9796 阅读 · 0 评论 -
Postgresql 字符串截取
在一次数据迁移中,遇到的一个场景。需要从一串 JSON 中提取其中一段字符串。在 Bing 上搜索发现很少在 Postgresql 中用到字符串截取的。下面是解决的方法,不一定好,但恰好可以解决问题。JSON 字符串'{"item":{"id":"c0540d7e-bedb-4521-b2b1-401d099575d1","name":"这时一张图片.jpg","path":"5cb...原创 2019-08-27 16:26:23 · 7050 阅读 · 0 评论