Skip to content

Conversation

d-w-moore
Copy link
Contributor

@d-w-moore d-w-moore commented Nov 16, 2020

A new built-in module irods_query provides a class query_iterator that wraps irods::query C++ iterator class using boost-python.
Thus, query_iterator allows:

  • general and specific query from Python rules.
  • access to bind args (?) in the SQL for specific query

A supplementary module irods_query_wrapper.py offers the IrodsQuery class, which wraps the boost-python class. It is used in this manner:

def my_rule( rule_args, callback, rei):
  for row in IrodsQuery( rei.rsComm, "select <row_names>  [from <table_names>] where [condition]" , 
                                    query_type = IrodsQuery.[GENERAL|SPECIFIC], [ other options as required... ] ):
      # process each `row' 

Tests still need to be written.

@d-w-moore d-w-moore marked this pull request as draft November 16, 2020 06:11
@d-w-moore d-w-moore marked this pull request as ready for review November 16, 2020 13:40
@trel
Copy link
Member

trel commented Jun 27, 2023

does this need any attention? plans moving forward?

@korydraughn
Copy link
Contributor

Oh! I don't remember ever seeing this work.

Very interesting.

@d-w-moore
Copy link
Contributor Author

I'll look back into it. I recall Jason asking for me to do this, and I do remember it working.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants