【问题标题】:Extract and process select/update query constraints in Teiid ddl in Virtual DB提取和处理虚拟数据库中 Teiid ddl 中的选择/更新查询约束
【发布时间】:2020-06-19 19:07:20
【问题描述】:

我正在使用 Teiid vdb 模型,我需要在 ddl 中提取查询约束并在存储过程中使用它来获取我选择的结果。例如,如果我运行以下查询: select * from Student where student_name = 'st123',我想将 st123 传递给我的 procedure 并根据一些处理返回结果。 如何在 ddl 中提取此约束,而不是 teiid 为我进行过滤并返回匹配的行。有没有办法开发连接器并在 vdb 中进行处理?

【问题讨论】:

    标签: jboss ddl teiid


    【解决方案1】:

    http://teiid.github.io/teiid-documents/master/content/reference/r_procedural-relational-command.html

    如果你有程序:

    create virtual procedure student (in student_name string) returns table (<some cols>) as
    begin
      if (student_name like '...')
      ...
    end
    

    那么你就可以把它当成一张桌子:

    select * from student where student_name = 'st123'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-09
      • 1970-01-01
      • 2020-09-09
      • 2021-03-07
      • 1970-01-01
      • 2012-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多