[转帖]金仓数据库KingbaseES分区表 -- 声明式创建分区表
https://www.modb.pro/db/638045
1. 创建分区表同时创建分区
1.1 准备环境
# 创建分区表同时创建分区
create table tb1(id bigint,stat date,no bigint,pdate date,info varchar2(50)) partition by range(pdate) INTERVAL ('1 MONTH'::INTERVAL)
(
PARTITION tb1_p1 VALUES LESS THAN ('2019-01-01'),
PARTITION tb1_p2 VALUES LESS THAN ('2019-02-01'),
PARTITION tb1_p3 VALUES LESS THAN ('2019-03-01'),
PARTITION tb1_p4 VALUES LESS THAN ('2019-04-01')
);
# 查看分区表父表
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00')
# 查看分区表子表
test=# \d+ tb1_tb1_p1
Table "public.tb1_tb1_p1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition of: tb1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00')
Partition constraint: ((pdate IS NOT NULL) AND ((pdate)::timestamp without time zone < '2019-01-01 00:00:00'::date))
Access method: heap
1.2 对分区表添加主键
# 分区表添加主键
test=# alter table tb1 add constraint tb1_pk primary key(id);
ALTER TABLE
# 查看分区表父表
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00')
# 查看分区表子表
test=# \d+ tb1_tb1_p1
Table "public.tb1_tb1_p1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition of: tb1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00')
Partition constraint: ((pdate IS NOT NULL) AND ((pdate)::timestamp without time zone < '2019-01-01 00:00:00'::date))
Access method: heap
# 查询user_indexes视图tb1_pk索引
test=# select index_name,index_type,table_name,table_type,uniqueness,compression from user_indexes where index_name =upper('tb1_pk');
index_name | index_type | table_name | table_type | uniqueness | compression
------------+------------+------------+------------+------------+-------------
TB1_PK | BTREE | TB1 | TABLE | UNIQUE | DISABLED
(1 row)
分区表添加主键:
添加主键的同时会创建主键列(字段)唯一索引(但是有唯一索引的列不一定是主键)。
主键字段不允许空值,添加主键过程中会自动添加not null非空约束,保证主键列值的唯一性。
分区表添加主键同时创建的索引(索引有GLOBAL)是全局索引。
分区表会在主键列创建一个全局(global)索引,默认为添加主键列的同时创建全局索引。
分区表唯一约束必须包含分区键。
1.3 对分区表创建索引
# 分区表创建索引
create index on tb1 (no) local;
CREATE INDEX
create index on tb1 (id,no) global;
CREATE INDEX
# 查看tb1表信息
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
"tb1_id_no_idx" btree (id, no)
"tb1_no_idx" btree (no)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00')
# 查看分区表tb1子表信息
test=# \d+ tb1_tb1_p2
Table "public.tb1_tb1_p2"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition of: tb1 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00')
Partition constraint: (((pdate IS NULL) OR ((pdate)::timestamp without time zone >= '2019-01-01 00:00:00'::date)) AND ((pdate IS NOT NULL) AND ((pdate)::timestamp without time zone < '2019-02-01 00:00:00'::date)))
Indexes:
"tb1_tb1_p2_id_no_idx" btree (id, no)
"tb1_tb1_p2_no_idx" btree (no)
Access method: heap
分区表创建索引:
在分区表创建本地索引,会自动在每个分区上创建一个本地索引。
分区表只能在主键列创建一个全局(global)索引,默认为添加主键列创建的索引。
分区表创建全局索引必须满足条件:索引类型是唯一索引(unique)并且不包含分区键 。
分区表父表不支持CONCURRENTLY、parallel_workers选项,子分区支持CONCURRENTLY、parallel_workers选项。
1.4 使用ATTACH PARTITION将普通表转换为分区表子分区
# 创建普通表
test=# create table tb1_tb1_p5(id bigint,stat date,no bigint,pdate date,info varchar2(50));
CREATE TABLE
test=# \d+ tb1_tb1_p5
Table "public.tb1_tb1_p5"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Access method: heap
# 使用ATTACH PARTITION将普通表转换为分区表子分区
test=# alter table tb1 ATTACH PARTITION tb1_tb1_p5 for VALUES FROM('2019-05-01') TO ('2019-05-31');
ERROR: column "id" in child table must be marked NOT NULL
# 创建的普通表,表结构、约束必须跟分区表一致
test=# alter table tb1_tb1_p5 alter id set not null;
ALTER TABLE
test=# \d+ tb1_tb1_p5
Table "public.tb1_tb1_p5"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Access method: heap
test=# alter table tb1 ATTACH PARTITION tb1_tb1_p5 for VALUES FROM('2019-05-01') TO ('2019-05-31');
ALTER TABLE
# 查看ATTACH后的分区表
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
"tb1_id_no_idx" btree (id, no)
"tb1_no_idx" btree (no)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00'),
tb1_tb1_p5 FOR VALUES FROM ('2019-05-01 00:00:00') TO ('2019-05-31 00:00:00')
test=# \d+ tb1_tb1_p5
Table "public.tb1_tb1_p5"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition of: tb1 FOR VALUES FROM ('2019-05-01 00:00:00') TO ('2019-05-31 00:00:00')
Partition constraint: (((pdate IS NULL) OR ((pdate)::timestamp without time zone >= '2019-05-01 00:00:00'::date)) AND ((pdate IS NOT NULL) AND ((pdate)::timestamp without time zone < '2019-05-31 00:00:00'::date)))
Indexes:
"tb1_tb1_p5_id_no_idx" btree (id, no)
"tb1_tb1_p5_no_idx" btree (no)
Access method: heap
ATTACH PARTITION将普通表转换为分区表子分区:
1 ATTACH普通表、分区表的列、字段类型、长度、约束必须一致。
2 分区表的unique和primary key约束将被应用在ATTACH新的子分区。
3 ATTACH过程中如果普通表有数据,会使用全表扫描检查数据是否违反分区约束(可以在ATTACH前使用约束筛选复合条件的数据)。
4 ATTACH外部表,不需要验证外部表中的数据符合分区约束。
5 如果ATTACH的表有跟分区不一致的索引,分区表会应用ATTACH表的索引。
2. 使用Create Table为分区表添加子分区
使用Create Table语句创建分区表子分区也会自动添加约束及索引。
# 使用Create Table语句创建分区表子分区
test=# CREATE TABLE tb1_tb1_p5 PARTITION OF tb1 FOR VALUES FROM ('2019-04-01') TO ('2019-04-30');
CREATE TABLE
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
"tb1_id_no_idx" btree (id, no)
"tb1_no_idx" btree (no)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00'),
tb1_tb1_p5 FOR VALUES FROM ('2019-04-01 00:00:00') TO ('2019-04-30 00:00:00')
test=# \d+ tb1_tb1_p5
Table "public.tb1_tb1_p5"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition of: tb1 FOR VALUES FROM ('2019-04-01 00:00:00') TO ('2019-04-30 00:00:00')
Partition constraint: (((pdate IS NULL) OR ((pdate)::timestamp without time zone >= '2019-04-01 00:00:00'::date)) AND ((pdate IS NOT NULL) AND ((pdate)::timestamp without time zone < '2019-04-30 00:00:00'::date)))
Indexes:
"tb1_tb1_p5_id_no_idx" btree (id, no)
"tb1_tb1_p5_no_idx" btree (no)
Access method: heap
3. 申明式创建分区总结
声明式分区,子分区和分区表列、类型、约束必须一致。
在申明式创建的分区表上创建索引,会自动将索引应用于所有的子分区。
分区表惟一约束必须包括分区键。
不能创建包含所有子分区的排除约束,只能每个子分区单独创建。
在分区表创建索引时(不可使用CONCURRENTLY),可使用on only在分区表创建标记失效的索引,避免大表创建索引耗时太久(子分区不会自动应用该索引),然后在所有子分区单独创建索引(可使用CONCURRENTLY),最后使用ALTER INDEX … ATTACH PARTITION附加到到父索引,所有子分区索引附加到父索引后会自动标记为有效。
# 分区表不支持使用CONCURRENTLY在父表创建索引
test=# create index CONCURRENTLY on tb1(info);
ERROR: cannot create index on partitioned table "tb1" concurrently
Time: 0.519 ms
# 使用on only在分区表创建索引
test=# create index on only tb1(info);
CREATE INDEX
Time: 1.845 ms
# 查看分区表tb1信息,tb1_info_idx标记为无效invalid
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
"tb1_id_no_idx" btree (id, no)
"tb1_info_idx" btree (info) INVALID
"tb1_no_idx" btree (no)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00'),
tb1_tb1_p5 FOR VALUES FROM ('2019-04-01 00:00:00') TO ('2019-04-30 00:00:00')
# 单独创建所有子分区索引
test=# create index tb1_tb1_p1_info_idx on tb1_tb1_p1(info);
CREATE INDEX
test=# create index tb1_tb1_p2_info_idx on tb1_tb1_p2(info);
CREATE INDEX
test=# create index tb1_tb1_p3_info_idx on tb1_tb1_p3(info);
CREATE INDEX
test=# create index tb1_tb1_p4_info_idx on tb1_tb1_p4(info);
CREATE INDEX
test=# create index tb1_tb1_p5_info_idx on tb1_tb1_p5(info);
CREATE INDEX
# 使用attach partition将所有子分区索引附加到父表
test=# alter index tb1_info_idx attach partition tb1_tb1_p1_info_idx;
ALTER INDEX
test=# alter index tb1_info_idx attach partition tb1_tb1_p2_info_idx;
ALTER INDEX
test=# alter index tb1_info_idx attach partition tb1_tb1_p3_info_idx;
ALTER INDEX
test=# alter index tb1_info_idx attach partition tb1_tb1_p4_info_idx;
ALTER INDEX
test=# alter index tb1_info_idx attach partition tb1_tb1_p5_info_idx;
ALTER INDEX
# 查看分区表tb1信息,tb1_info_idx自动标记为有效
test=# \d+ tb1
Partitioned table "public.tb1"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------+----------------------------+-----------+----------+---------+----------+--------------+-------------
id | bigint | | not null | | plain | |
stat | date | | | | plain | |
no | bigint | | | | plain | |
pdate | date | | | | plain | |
info | character varying(50 char) | | | | extended | |
Partition key: RANGE (pdate)
Range interval: INTERVAL ('0-1'::pg_catalog.interval)
Indexes:
"tb1_pk" PRIMARY KEY, btree (id) INCLUDE (tableoid) GLOBAL
"tb1_id_no_idx" btree (id, no)
"tb1_info_idx" btree (info)
"tb1_no_idx" btree (no)
Partitions: tb1_tb1_p1 FOR VALUES FROM (MINVALUE) TO ('2019-01-01 00:00:00'),
tb1_tb1_p2 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-02-01 00:00:00'),
tb1_tb1_p3 FOR VALUES FROM ('2019-02-01 00:00:00') TO ('2019-03-01 00:00:00'),
tb1_tb1_p4 FOR VALUES FROM ('2019-03-01 00:00:00') TO ('2019-04-01 00:00:00'),
tb1_tb1_p5 FOR VALUES FROM ('2019-04-01 00:00:00') TO ('2019-04-30 00:00:00')
[转帖]金仓数据库KingbaseES分区表 -- 声明式创建分区表的更多相关文章
- 通过ODBC接口访问人大金仓数据库
国产化软件和国产化芯片的窘境一样,一方面市场已经存在性能优越的同类软件,成本很低,但小众的国产化软件不仅需要高价买入版权,并且软件开发维护成本高:另一方面,国产软件目前普遍难用,性能不稳定,Bug ...
- QT 之 ODBC连接人大金仓数据库
QT 之 使用 ODBC 驱动连接人大金仓数据库 获取数据库驱动和依赖动态库 此操作可在人大金仓官网下载与系统匹配的接口动态库,或者从架构数据库的源码中获取驱动和依赖动态库 分别为: 驱动动态库:kd ...
- 通过jmeter连接人大金仓数据库
某项目用的人大金仓数据库,做性能测试,需要用jmeter来连接数据库处理一批数据.jmeter连接人大金仓,做个记录. 1. 概要 在"配置元件"中添加"JDBC Con ...
- SQL Server 2005中的分区表(一):什么是分区表?为什么要用分区表?如何创建分区表?(转)
如果你的数据库中某一个表中的数据满足以下几个条件,那么你就要考虑创建分区表了. 1.数据库中某个表中的数据很多.很多是什么概念?一万条?两万条?还是十万条.一百万条?这个,我觉得是仁者见仁.智者见 ...
- linux安装国产数据库(金仓数据库,达梦数据库,南大通用数据库)
今天在公司做的任务是,在Linux的环境下安装三种数据库,结果一种数据库也没有安装好,首先遇到的问题是安装南大通用数据库遇到安装的第五步,就出现问题了,问题是Gbase SDK没有安装成功,以及Gba ...
- Rocky4.2下安装金仓v7数据库(KingbaseES)
1.准备操作系统 1.1 系统登录界面 1.2 操作系统版本信息 jdbh:~ # uname -ra Linux jdbh -x86_64 # SMP Fri Dec :: CST x86_64 G ...
- 润乾配置连接kingbase(金仓)数据库
问题背景 客户根据项目的不同,使用润乾连接的数据库类型各种各样,此文针对前几日使用润乾设计器连接kingbase金仓数据库做一个说明. kingbase金仓数据库是一款国产数据库,操作方式和配置 ...
- 金仓Kingbase数据库网页数据维护分析工具
金仓Kingbase是优秀的国产数据库产品,在能源,政务,国防等领域广泛使用, 现在TreeSoft数据库管理系统已支持Kingbase了,直接在浏览器中就可以操作查看Kingbase数据了,十分方便 ...
- DBeaver连接达梦|虚谷|人大金仓等国产数据库
前言 工作中有些项目可能会接触到「达梦.虚谷.人大金仓」等国产数据库,但通常这些数据库自带的连接工具使用并不方便,所以这篇文章记录一下 DBeaver 连接国产数据库的通用模版,下文以达梦为例(其他国 ...
- 教你10分钟对接人大金仓EF Core 6.x
前言 目前.NET Core中据我了解到除了官方的EF Core外,还用的比较多的ORM框架(恕我孤陋寡闻哈,可能还有别的)有FreeSql.SqlSugar(排名不分先后).FreeSql和SqlS ...
随机推荐
- Kafka 源码解析:Server 端的运行过程
摘要:Kafka网络模块之Server端,介绍Server端启动.接收请求和处理请求的过程. 本文分享自华为云社区<Kafka网络模块-Server端>,原文作者:中间件小哥 . Sock ...
- 火山引擎 DataLeap 助你拥有 Notebook 交互式的开发体验
更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 Notebook 是一种支持 REPL 模式的开发环境.所谓「REPL」,即「读取-求值-输出」循环:输入一段 ...
- Solon2 之基础:四、应用启动过程与完整生命周期
串行的处理过程(含六个事件扩展点 + 两个函数扩展点),代码直接.没有什么模式.易明 提醒: 启动过程完成后,项目才能正常运行(启动过程中,不能把线程卡死了) AppBeanLoadEndEvent ...
- CentOS 硬盘扩容
首先在虚机内将硬盘空间扩大,Hyper-V 需要将检查点删除 查看物理卷和卷组,并将物理卷加入到卷组 lvextend -l +100%FREE /dev/centos/root #将剩余空间添 ...
- ORM执行SQL 双下划线查询 ORM外键字段创建 外键字段相关操作 ORM跨表查询 跨表查询进阶操作
目录 ORM执行SQL语句 方式1:使用pymysql模块 方式2:使用raw方法 方式3:django connection 双下划线查询 __gt(>) __lt(<) queryse ...
- Android Viewpager 滑动冲突解决
这篇博客主要讲解一下几个问题 粗略地介绍一下View的事件分发机制 解决事件滑动冲突的思路及方法 ScrollView 里面嵌套ViewPager导致的滑动冲突 ViewPager里面嵌套ViewPa ...
- 将文件从windows格式改为linux格式
1.使用notepad++软件转换 notepad++官方下载地址 使用notepad++打开文件---编辑---文档格式转换---转为unix---上传至linux 2.set ff vim 文件, ...
- Woodpecker CI 设计分析|一个 Go 编写的开源持续集成引擎
一.前言 大家好,这里是白泽.随着 Go 语言在云原生领域大放异彩,开发者逐渐将目光转移到了这门语言上,而容器则是云原生时代最核心的载体. <Woodpecker CI 设计分析>系列文章 ...
- 分库分表Sharding-JDBC + MyBatis-Plus动态表名
MyBatis-Plus动态表名 1: https://blog.csdn.net/Zack_tzh/article/details/107529746?utm_medium=distribute.p ...
- 自动化测试复习巩固第一天,requests的用法
如何快速发送post请求 因为我用的python语言,所以大家需要在本地安装python语言和pycharm,如何安装请自行查找教程,这里不做过多赘述 这里需要提前下载安装好需要的第三方库reques ...