On Mar 4, 10:08 pm, Thadeus Burgess <[email protected]> wrote:
> Also I added support so the DAL can check reserved SQL keywords.
>
> http://web2py.com/book/default/section/6/2

This is ok - but for dynamic sites (e.g. analysis, prototyping)  this
seems incomplete...

In general, it would seem, when DAL tries to update / create tables:

*  interface with existing / legacy DB would want "nothing" (?)
*  Power programmer would want to manage errors from back-end (is
messaging sufficient in DAL to implement "power use"?)
*  "normal"  user would like a consistency check on deployment (as
Thadeus noted, implemented above);
*  dynamic / automatic use (let interactive user create tables, run
simulations, etc. - not be constrained by particulars of back-end): do
automatic re-naming / mapping on conflict

For the last item, a simple way to do this is to simply prepend all
back-end names with "_" (underscore) as these are never reserved, and
always available (I mentioned this perhaps a year ago or more).

If you consider this tier of uses, then "check_reserved"  makes less
sense as a parameter (and what does it do, anyway? is it obvious?).

In essence, SQL compatability would suggest that error on table
creation would happen as default (e.g. check).  Then an enforce checks
for SMALLER list of backends would be an OPTION;  finally, an
automatic setting to automatically map all fields in a table to ensure
SQL compatibility could be part of this.

Thoughts?

- Yarko
>
> -Thadeus
>
> On Thu, Mar 4, 2010 at 7:35 PM, villas <[email protected]> wrote:
> > 'Password' is a reserved word and causes a problem in Firebird.  Try
> > this:
>
> > auth=Auth(globals(),db)
> > auth.settings.password_field='password2'   # Insert this line here.
> > auth.define_tables(migrate=False)
>
> > You can then work with a 'password2' field instead  :-)
>
> > Regards,
> > --David
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.
>
>

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

Reply via email to