Hi, Anyone here code sql seriously using Emacs and need strict Sql Coding Style [1]?
I found that the default Emacs' sql mode is geared more towards interactive debugging, instead of sql coding. E.g., I simply wasn't able to indent my sql code the same way as any other programming language. UTSL reveals that AbbrevMode is also not used, let alone using abbrevs in code only so as NOT show capitalization you do NOT expect to use FOR [2]. So, what's your solution? Thanks [1] E.g., http://c2.com/cgi/wiki?SqlCodingStyle 1. Capitalize SQL keywords. 2. Put separate constraints and column names on separate lines. 3. Indent equally detailed expressions equally. 4. Use a monospace font. 5. Right align equally important SQL keywords equally. SELECT Person.name AS firstName, Family.name AS lastName, Person.age FROM Person, Family WHERE Person.familyID = Family.ID AND Person.gender = 'M' ORDER BY lastName ASC, familyID ASC, firstName ASC, age DESC; http://www.remote-dba.net/t_plsql_coding_standards.htm Incorrect: DaysBetween (dStartDate => dEnrolledDate, dEndDate => dGraduationDate, nGPA => nFinalGPA, nDaysBetween => nDuration); Correct: DaysBetween (dStartDate => dEnrolledDate, dEndDate => dGraduationDate, nGPA => nFinalGPA, nDaysBetween => nDuration); [2] http://www.emacswiki.org/emacs/AbbrevMode -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/i5p8ov$so...@dough.gmane.org