You can view a proposed change, I have sent this to Massimo to look at.

http://code.google.com/r/thadeusburgess-web2py/source/detail?r=e875496cc5978200fb6c0aa0f85a8df1a945df21

I'm not sure what keywords we really want to use or not, but this is a
starting point.

I added two lists to BaseAdapter global. KEYWORDS_ALL and KEYWORDS_COMMON.

My thought is that no tablename or column name should pass through
KEYWORDS_COMMON, then KEYWORDS_ALL can be used to check integration
with other database types. So if it is in KEYWORDS_ALL just log a
warning.

Then each adapter will have their own set of reserved words that will
be stored in a list named KEYWORDS. So a tablename or column name will
fail if it is in either KEYWORDS_COMMON or KEYWORDS, and will send a
warning if it is in KEYWORDS_ALL.

I think this could go into sql.py as just fail on KEYWORDS_COMMON and
warn on KEYWORDS_ALL, and then the new dal will break it down by
database specifics.

What do you think?

It is then just one more step to add to DAL.__init__ a
target_sql_dialect which will use the KEYWORDS of the target adapter
so that you can catch these early on.

I have tested the patch in my system and its actually caught a
handfull of naming no-nos.

-Thadeus





On Tue, Feb 2, 2010 at 2:43 PM, Jonathan Lundell <jlund...@pobox.com> wrote:
> e check that used the union of all the keywo

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to