是否可以使用CQLSH查询来解码压缩斑点?

发布于 2025-02-06 16:26:49 字数 313 浏览 1 评论 0原文

我通过使用erlang函数“ term_to_binary”将文本转换为压缩斑点,将斑点保存在Cassandra中。 https://www.erlang.org.org/doc/man/erlang。 HTML#TERM_TO_BINAL-2

是否有一种方法可以使用CQLSH查询将上述压缩斑点解码为原始文本?

I am saving blob in cassandra by converting a text into a compressed blob using erlang function 'term_to_binary'.
https://www.erlang.org/doc/man/erlang.html#term_to_binary-2

Is there a way to decode the above compressed blob to original text using a cqlsh query?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜扑 2025-02-13 16:26:49

您可以使用binary_to_term将斑点转换回Erlang项,但是不能在cqlsh中完成,必须在应用程序级别在Erlang/Elixir中完成。

如果您想使用没有binary_ter_term的语言从数据库中读取,那么您可能对Bert感兴趣,Bert几乎与Erlang Term Format兼容,并且具有 javascript and 红宝石

另外,任何其他序列化格式,例如 piqi ,json,xml等都可以使用。

You can convert the blob back to an Erlang term with binary_to_term, but it cannot be done in cqlsh, it has to be done in Erlang/Elixir on the application level.

If you want to read from the database using a language which doesn't have binary_to_term, then you might be interested in BERT which is almost 100% compatible with Erlang Term Format and has libraries for Javascript and Ruby.

Alternatively, any other serialisation format like Piqi, JSON, XML etc would work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文