火鸟 BLR 解码器

发布于 08-13 07:10 字数 156 浏览 12 评论 0原文

各位。当我相信我是一个天才并且元数据是我的知识产权时,我在 firebird 中开发了一个程序来跟踪单个表上的更改,其中包含 id 和时间戳。所以,我做了一个非常聪明的举动并删除了这个过程的源代码。

有谁知道 BLR 解码器,或者我需要构建一个的文档吗?

TIA。

folks. When i belived i was a genius and that metadata was my intelectual property, i developed a procedure in firebird to track changes on a single table, something with id´s and time stamps. So, i´ve done a mega clever move and deleted the source of this procedure.

Does anyone knows a BLR decoder, or the doc´s that i need to build one?

TIA.

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

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

发布评论

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

评论(3

一绘本一梦想2024-08-20 07:10:15

Firebird 本身有很好的 BLR(二进制)到 BLR(文本)解码器。您可以使用set blob all(或set blobdisplay all)启用它。您可以从 ISQL 调用它:

SQL> set term !;
SQL> create procedure p1
CON> as
CON>   declare n integer = 1;
CON> begin
CON>   n = n * 2;
CON> end!
SQL> set term ;!
SQL> 
SQL> set blob all;
SQL> commit;
SQL> 
SQL> select rdb$procedure_blr from rdb$procedures where rdb$procedure_name = 'P1';

RDB$PROCEDURE_BLR 
================= 
             1a:3 
==============================================================================
RDB$PROCEDURE_BLR:  
            blr_version5,
            blr_begin,
               blr_message, 1, 1,0,
                  blr_short, 0,
               blr_begin,
                  blr_declare, 0,0, blr_long, 0,
                  blr_assignment,
                     blr_literal, blr_long, 0, 1,0,0,0,
                     blr_variable, 0,0,
                  blr_stall,
                  blr_label, 0,
                     blr_begin,
                        blr_begin,
                           blr_assignment,
                              blr_multiply,
                                 blr_variable, 0,0,
                                 blr_literal, blr_long, 0, 2,0,0,0,
                              blr_variable, 0,0,
                           blr_end,
                        blr_end,
                  blr_end,
               blr_send, 1,
                  blr_begin,
                     blr_assignment,
                        blr_literal, blr_short, 0, 0,0,
                        blr_parameter, 1, 0,0,
                     blr_end,
               blr_end,
            blr_eoc

==============================================================================

There is nice BLR (binary) to BLR (text) decoder in Firebird itself. You can enable it with set blob all (or set blobdisplay all). You can call it from ISQL:

SQL> set term !;
SQL> create procedure p1
CON> as
CON>   declare n integer = 1;
CON> begin
CON>   n = n * 2;
CON> end!
SQL> set term ;!
SQL> 
SQL> set blob all;
SQL> commit;
SQL> 
SQL> select rdb$procedure_blr from rdb$procedures where rdb$procedure_name = 'P1';

RDB$PROCEDURE_BLR 
================= 
             1a:3 
==============================================================================
RDB$PROCEDURE_BLR:  
            blr_version5,
            blr_begin,
               blr_message, 1, 1,0,
                  blr_short, 0,
               blr_begin,
                  blr_declare, 0,0, blr_long, 0,
                  blr_assignment,
                     blr_literal, blr_long, 0, 1,0,0,0,
                     blr_variable, 0,0,
                  blr_stall,
                  blr_label, 0,
                     blr_begin,
                        blr_begin,
                           blr_assignment,
                              blr_multiply,
                                 blr_variable, 0,0,
                                 blr_literal, blr_long, 0, 2,0,0,0,
                              blr_variable, 0,0,
                           blr_end,
                        blr_end,
                  blr_end,
               blr_send, 1,
                  blr_begin,
                     blr_assignment,
                        blr_literal, blr_short, 0, 0,0,
                        blr_parameter, 1, 0,0,
                     blr_end,
               blr_end,
            blr_eoc

==============================================================================
软甜啾2024-08-20 07:10:15

我见过一个 BLR 显示工具(在 Jason Wharton 的 IB 管理工具中),但它只会显示 BLR 名称,不会音译回 SQL/proc 语言。我认为您正在寻找的东西不存在。

您可以在此处获取 BLR 文档,不过。

I've seen a BLR display tool (in Jason Wharton's IB admin tool), but it would only display BLR names, not transliterate back to SQL/proc language. I think what you're looking for doesn't exist.

You can get BLR documentation here, though.

吻安2024-08-20 07:10:15

如果您仍然拥有数据库,则过程源有可能仍然存在于某处,但标记为已删除。您可以尝试在十六进制编辑器上打开数据库文件并搜索过程名称。

If you still have the database there is a chance the procedure source is still there somewhere but marked as deleted. You may try to open the database file on a hex editor and search for the procedure name.

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