Helma Logo
main list history

Version 5 by hannes on 02. April 2009, 10:37

1<b>Update:</b> this the functionality described in this proposal has been implemented as by HopObject.getCollection() - see *Creating Collections programmatically*.

Version 4 by hannes on 02. April 2009, 10:36

1<b>Update:</b> this functionality has been implemented as HopObject.getCollection() - see *Creating Collections programmatically*.
2

Version 3 by hannes on 21. September 2007, 10:39

17    type: Page,
22     },

Version 2 by hannes on 21. September 2007, 10:39

1I've been thinking about a query feature that allows to build HopObject collection on the fly. Under the hood, the query object would be a HopObject with a custom DbMapping. The SQL query would probably be built using a subnodeRelation built from properties of the query object's filter property. These filter conditions could cover a number of common comparison operators:

Version 1 by hannes on 21. September 2007, 10:32

1I've been thinking about query feature that allows to build HopObject collection on the fly. Under the hood, the query object would be a HopObject with a custom DbMapping. The SQL query would probably be built using a subnodeRelation built from properties of the query object's filter property. These filter conditions could cover a number of common comparison operators:
2
3* columnname - add equal to clause for the column
4* columnname_not_equal - add not equal to clause for the column
5* columnname_less_than - add less than clause for the column
6* columnname_greater_than - add greater than clause for the column
7* columnname_less_or_equal - add a less than or equal to clause for the column
8* columnname_greater_or_equal - add a greater than or equal for the column
9* columnname_like - add like clause for the column
10* columnname_not_like - add not like clause for the column
11* columnname_is_null - add is null clause for the column
12* columnname_not_null - add is not null clause for the column
13
14Query objects could be created by a constructor or factory function passing the arguments as object literals.
15
16  var q = new HopQuery({
17    type: Page
18    filter: {
19        createtime_greater_than: t1,
20        createtime_less_or_equal: t2,
21        type_like: "update:%"
22    }
23    order: "createtime desc"
24  });