Changes between Initial Version and Version 1 of TracSqlHelperScript


Ignore:
Timestamp:
Jul 20, 2009, 7:28:58 PM (15 years ago)
Author:
Jeff Hammel
Comment:

New hack TracSqlHelperScript, created by k0s

Legend:

Unmodified
Added
Removed
Modified
  • TracSqlHelperScript

    v1 v1  
     1= helper functions to make Trac SQL DB query more API-ish =
     2
     3== Description ==
     4
     5While there is considerable contention on the subject, I am one of those people that doesn't like to see SQL statements in python code (or C code, etc). I especially don't like it when the same basic statements are repeated all over the place.  So TracSqlHelperScript is my attempt to encapsulate all of this logic in one place.  These are functions I've already co-written for the TracHoursPlugin and then rewritten (some of them) for the GeoTicketPlugin.  Instead of rewriting them again for yet another plugin where I want this functionality, I'm making a library out of them which hopefully I will backport to those plugins.
     6
     7I'd really like a better story for this in general, like having at least some of these convenient functions on the DB cursor.  But quite frankly, I'm not an SQL expert, and IMHO it would be better for Trac to completely abstract its backend, so I'll leave whatever action for those that know better and stick with this library for my purposes.
     8
     9== Bugs/Feature Requests ==
     10
     11Existing bugs and feature requests for TracSqlHelperScript are
     12[report:9?COMPONENT=TracSqlHelperScript here].
     13
     14If you have any issues, create a
     15[http://trac-hacks.org/newticket?component=TracSqlHelperScript&owner=k0s new ticket].
     16
     17== Download ==
     18
     19Download the zipped source from [download:tracsqlhelperscript here].
     20
     21== Source ==
     22
     23You can check out TracSqlHelperScript from [http://trac-hacks.org/svn/tracsqlhelperscript here] using Subversion, or [source:tracsqlhelperscript browse the source] with Trac.
     24
     25== Example ==
     26
     27See the GeoTicketPlugin and the TracHoursPlugin for how these functions are used.  Essentially, they're to help build new plugins with when you want to have a slightly abstracted database layer.  I'd love help with this, if anyone would like to contribute.
     28
     29== Recent Changes ==
     30
     31[[ChangeLog(tracsqlhelperscript, 3)]]
     32
     33== Author/Contributors ==
     34
     35'''Author:''' [wiki:k0s] [[BR]]
     36'''Contributors:'''