Apache-ShenYu网关-rule
是一个MySQL数据库表,表名为 yesapi_rule,
共包含 11 个字段。
所属分类:微服务。
该表提供了完整的字段定义、类型说明、默认值、索引设计和示例数据,可直接用于MySQL数据库建表。
💡 使用方式:复制下方SQL语句到MySQL客户端执行即可创建此表;也可通过果创云一键创建并生成RESTful API接口,免去手动部署。
MySQL数据库表结构设计
第 1-11 条, 共 11 条.
| 字段名称 | 字段类型 | 字段默认值 | 是否允许为空 | 字段描述 | 索引 | 字段数据示例 |
|---|---|---|---|---|---|---|
| selector_id | varchar(128) | 否 | selector id | 无索引 | ||
| match_mode | int(11) | 否 | matching mode (0 and 1 or) | 无索引 | ||
| rule_name | varchar(128) | 否 | rule name | 无索引 | ||
| enabled | tinyint(4) | 否 | whether to open (0 close, 1 open) | 无索引 | ||
| loged | tinyint(4) | 否 | whether to log or not (0 no print, 1 print) | 无索引 | ||
| match_restful | tinyint(4) | 否 | whether to match restful(0 cache, 1 not cache) | 无索引 | ||
| namespace_id | varchar(50) | 否 | namespace id | 无索引 | ||
| sort_code | int(11) | 否 | sort | 无索引 | ||
| handle | text | 是 | processing logic (here for different plug-ins, there will be different fields to identify different processes, all data in JSON format is stored) | 无索引 | ||
| date_created | timestamp(3) | 是 | create time | 无索引 | ||
| date_updated | timestamp(3) | CURRENT_TIMESTAMP | 否 | update time | 无索引 | CURRENT_TIMESTAMP |
MySQL建表SQL语句
来源:Apache-ShenYu网关-rule | 链接:https://open.yesapi.cn/tablelist/yesapi_rule.html
SQL
-- 数据库大全:Apache-ShenYu网关-rule
-- 来源:YesApi.cn
CREATE TABLE `yesapi_rule` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`selector_id` varchar(128) NOT NULL COMMENT 'selector id',
`match_mode` int(11) NOT NULL COMMENT 'matching mode (0 and 1 or)',
`rule_name` varchar(128) NOT NULL COMMENT 'rule name',
`enabled` tinyint(4) NOT NULL COMMENT 'whether to open (0 close, 1 open) ',
`loged` tinyint(4) NOT NULL COMMENT 'whether to log or not (0 no print, 1 print) ',
`match_restful` tinyint(4) NOT NULL COMMENT 'whether to match restful(0 cache, 1 not cache)',
`namespace_id` varchar(50) NOT NULL COMMENT 'namespace id',
`sort_code` int(11) NOT NULL COMMENT 'sort',
`handle` text NOT NULL COMMENT 'processing logic (here for different plug-ins, there will be different fields to identify different processes, all data in JSON format is stored)',
`date_created` timestamp(3) NOT NULL COMMENT 'create time',
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'update time',
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'Apache-ShenYu网关-rule';
复制后,到数据库执行,即可创建此数据库表。
📖 如何使用 Apache-ShenYu网关-rule 数据库表
- 手动建表:复制上方SQL语句,在MySQL客户端(如Navicat、phpMyAdmin、命令行)中执行即可
- 一键创建:点击「立即免费创建此表」按钮,果创云自动生成表和RESTful API接口
- API调用:创建表后,即可通过HTTP接口对数据进行增删改查操作
- 二次开发:支持自定义字段、添加业务逻辑、生成小程序/APP后端接口
❓ 常见问题
Q:Apache-ShenYu网关-rule表的主键是什么?
A:主键为
id 字段,类型为 bigint(20) unsigned NOT NULL AUTO_INCREMENT,自增无符号整数。Q:如何在项目中使用这张表?
A:可以直接复制建表SQL到MySQL数据库中执行创建,也可以通过果创云平台一键创建并自动生成RESTful API接口,无需手动部署。
Q:这张表的索引有哪些?
A:仅有主键索引(id)。
粤公网安备44011302002121号
|
