"Aaron Held" <[EMAIL PROTECTED]> wrote: > Right now I am converting a project that I started w/ DODS into webware and that is >the feature that I miss most. I can build a > query in DODS by calling methods such as > > callLogQuery.addWhereClause( callLogTable.State, "NJ", QueryBuilder.EQUALS) > callLogQuery.addWhereClause( "extention", "1111", QueryBuilder.EQUALS) > callLogQuery.addWhereClause( "duration", "60", QueryBuilder.GREATER_THAN)
I have considered making something like this, except with more pleasant expressions. Maybe something like: query = AND(VAR.callLogTable.State == "NJ", VAR.extension == 1111, VAR.duration > 60) With later Python versions (2.0, 2.1?) you can overload ==, <, >, etc. fairly well. You cannot meaningfully overload and, or, or not (though you could overload &, |, and ~). You also will probably get bad results if you did "NJ" == VAR.callLogTable.State, since "NJ" gets the first chance to test equality, and it'll just return False instead of a fancy where-clause object. I don't know if this would work with DDOS anyway, but it could work well for programmers. Ian _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss