Skip to content

Conversation

v1p2nd
Copy link
Contributor

@v1p2nd v1p2nd commented Sep 18, 2024

新初始化数据库,修改前端配置后,把origin_setting当作[]byte去读取会报错:

{"error": "sql: Scan error on column index 13, name \"origin_setting\": Scan source was not []bytes"}

如果数据库不支持json的话一般是当作text来存的吧,所以应该可以直接改成当string去读取(我只在pgsql下进行了测试)

@pixelmaxQm pixelmaxQm merged commit 3d58213 into flipped-aurora:main Sep 18, 2024
8 checks passed
@pixelmaxQm
Copy link
Collaborator

经测试,在mysql环境下无法使用text获取byte属性参数,因此做了兼容断言,此PR已撤销,非常感谢您发现此问题。
0fd9e95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants