【TcaplusDB知识库】RESTfulAPI2.0 for Generic表-[PB] DeleteRecord2.0介绍
简介
通过指定的主键key删除记录,如果记录不存在,则返回相关错误信息。
POST http://{Tcaplus_REST_URL}
请求语法
Http请求
#腾讯云控制台 RESTful Endpoint, ip:80, 端口默认80
http://172.17.0.22
#TcaplusDB本地docker版 RESTful Endpoint, ip:31001, 端口默认31001
http://9.135.8.93:31001
名称 |
限制条件 |
说明 |
|
x-tcaplus-target |
是 |
无 |
Tcaplus.DeleteRecord |
是 |
Tcaplus3.50.0 |
||
x-tcaplus-app-id |
是 |
无 |
对应业务id编号(aka,集群接入id) |
x-tc数据库系统工程师aplus-zone-id |
是 |
无 |
对应zone编号(aka,表格组id) |
x-tcaplus-protocol-version |
是 |
无 |
对应protocol版本号,默认2.0 |
x-tcaplus-table-name |
是 |
无 |
对应表名 |
x-tcaplus-pwd-md5 |
是 |
无 |
业务密码(aka,集群访问密码)数据库系统的核心是,传入计算后的md5值 |
x-tcaplus-idl-type |
是 |
无 |
protobuf |
x-tcaplus-result-flag数据库管理系统 |
否 |
无 |
0:操作成功后不返回数据1:操作成功后返回和腾讯云游戏平台官网请求一致的数据2:操作成功后返回本次update操作后的数据3:操作成功后返回tcaptcaplusdbsvr端操作前的数据 |
x-tcaplus-data-version-check |
否 |
1:检测记腾讯云电脑录版本号,只有当该版本号与服务器端的版本号相同时,该版本号才会自增2:不检测记腾讯云官网首页录版本号,强制把客户端的记录版本号写入到服务器中3:不检测记录版本号,将服务器端的版本号自增 |
|
x-tcaplus-data-version |
否 |
具腾讯云盘体的version值 |
示例:
x-tcaplus-target:Tcaplus.DeleteRecord
x-tcaplus-app-id:3
x-tcaplus-zone-id:1
x-tcaplus-protocol-version:2.0
x-tcaplus-table-name:game_players
x-tcaplus-pwd-md5:4e81984efccfb4982333aeb1ff7968d5
x-tcaplus-result-flag:3
x-tcaplus-version:Tcaplus3.50.0
x-tcaplus-data-version-check: 3
x-tcaplus-idl-type:protobuf
使用json格式表示记录相关信息。参数说明:
示例:
{
"Record": {
"player_id":4,
"player_name":"4",
"player_email":"4"
}
}
curl -i -XPOST -H 'x-tcaplus-target: Tcaplus.DeleteRecord' -H 'x-tcaplus-app-id: 70' -H 'x-tcaplus-zone-id: 1' -H 'x-tcaplus-protocol-version: 2.0' -H 'x-tcaplus-table-name: game_players' -H 'x-tcaplus-pwd-md5: 0972ad76decf4d11a69e2e0d9af335da' -H 'x-tcaplus-result-flag: 2' -H 'x-tcaplus-version: Tcaplus3.50.0' -H 'x-tcaplus-data-version-check: 2' -H 'x-tcaplus-idl-type: protobuf' http://172.17.32.17 -d '{
"Record": {
"player_id":4,
"player_name":"4",
"player_email":"4"
}
}'
返回语法
参数名 |
说明 |
参数名 |
说明 |
ErrorCode |
返回码 |
返回信息 |
|
Record |
成功的记数据库系统概论第五版课后答案录数 |
{
"ErrorCode": 0,
"ErrorMsg": "Succeed",
"RecordVersion": 1,
"Record": {
"player_id": 4,
"player_name": "4",
"player_email": "4",
"game_server_id": 4,
"login_timestamp": [],
"logout_timestamp": [],
"is_online": false,
"pay": {
"pay_id": 4,
"amount": 4,
"method": 4
}
}
}
{
"ErrorCode": 261,
"ErrorMsg": "Record does not exist"
}
TcaplusDB是腾讯出品的分布式NoSQL数据库,存数据库管理系统储和调度的代码完全自研。具tcaplusdb备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和腾讯云电脑复杂数据结构等特性数据库。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融数据库系统工程师、制造和物联网等领域。
发表评论