yep, currently the first _ tells where a filedname starts (as data is stored as tablename_fieldname). _some_name means thee is no table, so it is a special field (eg expression)
for now it has too much impact to change it in the DAL. Simply removing the indicated lines will brake web2py somewhere else. The DAL is currently being rewritten, so Massimo might need to check if this case is now supported. On Mon, Jul 20, 2009 at 00:03, Yarko Tymciurak<[email protected]> wrote: > Massimo can comment on this, but I think _some_name is the representation > DAL uses internally for expressions; > > I think SQL allows "_" starting names; in fact, there were some reserved > word problems that caused me at one time to suggest that _all_ names > submitted to the db be transformed to "_name" so they were guarenteed to be > valid (no reserved word clash), and that internal names always be double > underscore.... > > On Sun, Jul 19, 2009 at 3:59 PM, Boriel <[email protected]> wrote: >> >> Well, I jumped into this error: >> >> SQLField: invalid field name: '_5_voltage' >> >> It was an exception generated on file gluon/sql.py, line #1763 >> Removing lines 1762 & 1763 will allow fieldnames starting with "_" >> character to be allowed. >> I suppose preventing column names starting with "_" is by design, but why >> exactly? >> >> MySQL, MSSQL & SQLite allows such column names. Maybe other DB engines >> (e.g. Oracle) don't? >> >> I'm asking this because If it's just due to Oracle (or whatever) >> compatibility, I can remove these lines (I need field names starting with >> "_"). >> >> Regards, >> J. >> >> PS: This message has been resent, since I can't see it published after 24h >> ?? >> >> -- >> Boriel http://www.boriel.com >> >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

