irods / python-irodsclient

A Python API for iRODS
Other
63 stars 73 forks source link

Add support for GenQuery2 API #535

Closed korydraughn closed 4 months ago

korydraughn commented 5 months ago

See https://github.com/irods/irods/blob/3af66900a0189690deaece96d61f26a52b6c3f7b/lib/api/include/irods/genquery2.h

d-w-moore commented 5 months ago

Do we do it in the present PRC style of queries, that is sessions.query(User).filter(User.name == 'some_user') and all of that? Or should we just allow query strings as the means of expression?

trel commented 5 months ago

I think it's easier to just hand a string to the server... but not sure how 'Pythonic' that is...

Can we start with 'just hand a string', and then... see how it feels?

d-w-moore commented 5 months ago

I think it's easier to just hand a string to the server... but not sure how 'Pythonic' that is...

Can we start with 'just hand a string', and then... see how it feels?

That would be the first and simplest thing. I'm not a fan of the current serialization to XML, or at least would try and simplify it for sanity's sake if we had to do it again. But the XML does have the advantage that we wouldn't have to rely on complex escaping mechanisms when there are quotes or other special characters to be dealt with.

korydraughn commented 5 months ago

Make it take a string. The actual API requires strings so there's no point in mixing it with the GenQuery1 facilities.

alanking commented 4 months ago

I think we did it. Anything else to do here, @korydraughn?

korydraughn commented 4 months ago

We're all good here. Closing.