TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Database validation before entry – JSON

1 点作者 californiacream将近 3 年前
Hi all, is it possible to set up real database json validation without entering data into a dB? Sort of like a rolled back entry (perhaps in real-time, or close to it) whilst data entry is occuring?<p>For example, the moment a data entered row has been completed (or earlier, perhaps?), send a rest API (pseudo)-post request just to see if data can get into database in its complete form - that is passing all primary and foreign key constraints, as well as triggers&#x2F;constraints.<p>If data is no good, present the user an enumerated list of issues in real-time (Error: Please ensure that item X exists in library Y - would you like to quickly add X to Y?).<p>If all validations pass, and data is truly valid, allow option to do the post request for real.<p>I&#x27;m sure this is not novel, but don&#x27;t know the search term to find info on it.<p>Any ideas? I am ideally using this with Postgres, JSON, FastAPI, and pydantic etc.

暂无评论

暂无评论