nodeSolidServer / nodeSolidServer/node-solid-server

Deletion of decimals fail with a 409

未关闭
#1,519 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.8k
派生
308
PR 合并指标
30 天内没有已合并 PR

描述

When I write the following data to my Pod:

@prefix : <#>.
@prefix schem: <http://schema.org/>.

:160581889284507796464006133086
a schem:MonetaryAmount; schem:amount 1.0; schem:currency "USD".

Written using the following request:

curl 'https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl' -X PATCH -H 'Content-Type: application/sparql-update' --data-raw $' INSERT DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;\n    <http://schema.org/currency> "USD";\n    <http://schema.org/amount> "1"^^<http://www.w3.org/2001/XMLSchema#decimal>.\n};'

As far as I can tell I should be able to delete that data with the following PATCH:

DELETE DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;
    <http://schema.org/amount> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal>;
    <http://schema.org/currency> "USD".}; 

However, that results in the following response:

The patch could not be applied. Could not find to delete: https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086 http://schema.org/amount "1.0"^^http://www.w3.org/2001/XMLSchema#decimal .

This appears to happen specifically with decimals. (Though it seems to be the problem has a similar root cause to https://github.com/solid/node-solid-server/issues/1468, but for decimals rather than booleans.)

See this sandbox for the reproduction (log in with a solidcommunity.net account): https://codesandbox.io/s/floral-glitter-jfejz?file=/src/index.ts

(Originally reported by @abigpotostew against Tripledoc.)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用 issue 中的 curl 请求复现十进制 DELETE DATA 失败,并将其与前面的 INSERT DATA 请求进行比较。跟踪服务器对十进制 RDF 术语的 PATCH 处理;当请求使用等效的 "1.0"^^xsd:decimal 值时,能够成功删除已存储的 "1"^^xsd:decimal,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
backend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。