Re: how to call user-defined database functions through the Django query syntax?

2011-04-20 Thread Andrew Dalke
Hi Riccardo, > I recently put some spare time on the same problem, trying to extend > the django database API to support the management of chemical > information. Sweet! I must say that I looked at the code with some dismay. Not because of the code, but because it looks like it's a *lot* of

Re: how to call user-defined database functions through the Django query syntax?

2011-04-20 Thread Andrew Dalke
rned the syntax by seeing what Django does for that case. This means my extra() call would need to know the alias Django uses for making the call, and that's not available programmatically. I could hard code it to "T6" or whatever, but that's very much a hack. (Although it might still be

how to call user-defined database functions through the Django query syntax?

2011-04-20 Thread Andrew Dalke
def __init__(self, smarts): self.smarts = smarts def as_sql(self, column): return ("oe_matches(%s, %s)", (column, smarts)) I looked but found nothing in the documentation or on the way for how to access user-defined function in Django except through the raw() interface. A