[FEATURE] server端处理CMS数据时进行空值检测 #93
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
功能概述/Summary
在Server端用于处理CMS数据的Mapper中添加类型处理与空值判断
需求背景/Motivation
在Directus Schema中,根据类型与查询语句的不同,返回的数据可能为不同的类型:
而在server端用于处理CMS数据的Mapper中并未对这些类型进行处理,而是预设方法获得正确类型的输入,导致开发者需要在调用之前进行类型限制,这可能增加隐形的开发维护成本
解决方案/Proposal
对于关系型数据的输入,方法应当接受所有类型的输入,但是只处理
Object类型的输入,而对于其他类型的输入,返回默认值替代方案/Alternatives
No response
检查表/Checklist