问题描述
我正在研究有关 MariaDB 动态列概念与 Java 集成的概念证明.所以问题是列将在 BLOB 中,数据将存储在键值对中.目前从数据库返回的 byte[] 没有任何 JSON 对象格式或任何分隔符.所以很难解析数据并找到键的值.这可以使用 Java 中的本机查询来完成.但是如何使用 JPA/Hibernate 检索数据,或者它们是否支持动态列?提前致谢.
I am working on Proof of concept regarding the integration of MariaDB Dynamic column concept with Java. So the problem is the column will be in BLOB and the data will be stored in key - value pairs. Currently when byte[] is returned from the database doesnot have any JSON object format or any separators. So its very hard to parse the data and find the value for a key. This can be done using Native queries in Java. But how to retrieve data using JPA/Hibernate or will they support Dynamic columns? Thanks in Advance.
推荐答案
您是否尝试以 COLUMN_JSON(dyncol) 形式检索数据?在此处阅读更多信息:https://mariadb.com/kb/en/mariadb/column_json/
Have you tried to retrieve the data as COLUMN_JSON(dyncol)? Read more about it here: https://mariadb.com/kb/en/mariadb/column_json/
这篇关于Java 中的 MariaDB 动态列集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!