From: Alex B. <en...@tu...> - 2001-08-23 18:44:25
|
>>> Wouldn't it be better just to define column and table names as >>> case-insensitive and always uppercase/lowercase them in >>> QueryManager before doing a MetaBase query? > >> 2) >> I don't like it because I think it's a hell of a lof more elegant to have >> 'name sync' between entities, entity paths, and sql. > > I'm with you. If we establish a standard like proposed, we must keep it > throughout the system. It makes live lot easier. Agreed. I don't want to put in any code that necessarily enforces the standard, but I want to document and adhere to it. >>> be nice. E.g. "FurbeeId" is more readable than "furbeeid" or "FURBEEID". >> The above is opinion, not doctrine... does anyone else have an opinion on >> this one? > Personally I like the furbeeId, userId, furbeeName syntax. But with the > compatibility issues and the complexity of the system in mind it might be > really wired in large applications. Its easier to track the path from a > entity to the database if everything is in sync. actually, I agree: I prefer MooId or mooId, etc. But I think if we have to go with 'single case' the best is lowercase field_name > Additionally I prefer do add the strtolower() thing in buffer creation ( as > originally done with strotupper() ). So users have the freedom to name the > database fields mixed case (FurbeeId) but the system gets them as all > lowercase (furbeeid). But for the repository modules it should stay as > proposed. hmm. that is enforcing policy, but I think I'm willing to break my statement above and say "yeah" :) > Note to the query syntax: As I said before I like to write queris with SQL > statements UPPERCASE. I'd love to add this to the standard 'caus it make the > queries MUCH more readable. yes, ditto. > So from my point of view I think the following is very acceptable: > > For modules to be distributed with binarycloud or available from the > (upcoming) module repository, as well as for binarycloud core components > you must: > - Use field and table/entity names with less than 32 chars > - Use lowercase for all database, field and table/entity names > - Use CAPS for SQL command (SELECT, AS, FROM, DELETE...) > - Verify that your SQL & Schemas work with Oracle, MySQL, and PostgreSQL. deal. anyone else have comments/etc? I'm preparing a significant revision on the binarycloud coding standards... this will make it in. best, _alex |