企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 数据库字段处理 | 传入参 | 说明 | | --- | --- | | handle | [ 必填 ] 处理类型 | | table | [ 必填 ] 表名 | | other | [ 选填 ] 配置参数数组 | * 样式 ~~~ $Sql->alert($handle,$table,$other); ~~~ * auto设置主键初始值 ~~~ $back = $Sql -> alert("auto",$table,['value'=>"100001"]); ~~~ * add新增字段 ~~~ $other = []; $other['field'] = 'uuid char(36) NOT NULL default ""'; $back = $Sql -> alert("add",'table',$other); ~~~ * edit编辑字段 ~~~ $other = []; $other['field1'] = 'field_1 int(10) NOT NULL default "0"'; $other['field2'] = 'field_2 char(255) NOT NULL default ""'; $back = $Sql -> alert("edit",$table,$other); ~~~ * index_add索引新增 ~~~ $other = []; $other['index_name'] = 'field_1,field_2'; $back = $Sql -> alert("index_add",$table,$other); ~~~ * index_del索引新增 ~~~ $other = []; $other[] = 'index_name_1'; $other[] = 'index_name_2'; $back = $Sql -> alert("index_del",$table,$other); ~~~ * unique唯一索引 ~~~ $other = []; $other['field'] = ['field_1','field_2']; $other['name'] = 'unique_name'; $back = $Sql -> alert("unique",$table,$other); ~~~ | 修订时间 | 开发版本 | | --- | --- | | 2020-09-10 | 宝知林 - 服务端 |