By any chance is the DAL list:integer type implemented as a postgresql
array? The web2py book would say no--the list:integer is a big text field
as '1 | 2 | 3', etc.
Could it be implemented using postgresql's native array types in the DAL
driver for postgresql? I'd assume that optimized db query code would be
rather faster than parsing a big text field in python code.
How could I code a model with a FIELD function that referred to a
postgresql array field ('CREATE TABLE foo (favorites integer[], more
fields...);') that I created outside of the DAL? I am thinking this is not
possible as the DAL types could not map to this postgresql type to express
queries and handle results.
Assuming I end up using Field('favorites', 'list:integer') what are the
performance implications?
My usage is that each user can have favorites, which will simply be the
numeric key of the favorite item. A favorites table would have three
fields: id (as key), user (refer to auth.user.id), favorites (a list or
array of integers).
Thanks for any suggestions/comments.
- Lewis