Changes between Version 15 and Version 16 of SqlQueryMacro
- Timestamp:
- Feb 12, 2013, 3:17:37 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SqlQueryMacro
v15 v16 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Execute an SQL Query = 3 4 4 == Description == 5 6 Execute an SQL Query against a configured database displaying a formatted table 7 of results. 5 Execute an SQL Query against a configured database displaying a formatted table of results. 8 6 9 7 See also WikiTableMacro for a simpler implementation, which does not allow to define a datasource. 10 8 11 == Bugs/Feature Requests == 9 == Bugs/Feature Requests == 10 Existing bugs and feature requests for SqlQueryMacro are [report:9?COMPONENT=SqlQueryMacro here]. 12 11 13 Existing bugs and feature requests for SqlQueryMacro are 14 [report:9?COMPONENT=SqlQueryMacro here]. 15 16 If you have any issues, create a 17 [http://trac-hacks.org/newticket?component=SqlQueryMacro&owner=JamesMills new ticket]. 12 If you have any issues, create a [http://trac-hacks.org/newticket?component=SqlQueryMacro&owner=JamesMills new ticket]. 18 13 19 14 == Download == 20 21 15 Download the zipped source from [download:sqlquerymacro here]. 22 16 23 17 == Source == 24 25 18 You can check out SqlQueryMacro from [http://trac-hacks.org/svn/sqlquerymacro here] using Subversion, or [source:sqlquerymacro browse the source] with Trac. 26 19 27 20 == Example == 21 This macro can be used in one of two ways: 28 22 29 This macro can be used in one of two ways:30 23 {{{ 31 24 {{{ … … 34 27 }}} 35 28 }}} 36 37 29 or 38 30 … … 40 32 [[SQL(SELECT * FROM foo)]] 41 33 }}} 34 == Install == 35 This macro requires the [https://bitbucket.org/prologic/pymills pymills] library and makes use of its '''db''' and '''table''' modules. Please install pymills first. 42 36 43 == Install == 37 {{{ 38 #!sh 39 wget https://bitbucket.org/prologic/pymills/get/0d1424e1b0ab.zip 40 unzip 0d1424e1b0ab.zip 41 easy_install $PWD/prologic-pymills-0d1424e1b0ab 42 }}} 43 To install the macro: 44 44 45 This macro requires the [http://trac.shortcircuit.net.au/ pymills] library and makes use of its '''db''' and '''table''' modules.46 Please install pymills first.47 {{{48 easy_install pymills49 }}}50 51 To install the macro:52 45 {{{ 53 46 easy_install TracSqlQueryMacro 54 47 }}} 48 To enable: 55 49 56 To enable:57 50 {{{ 58 51 #!ini … … 60 53 sqlquery.* = enabled 61 54 }}} 62 63 55 == Configure == 64 56 To configure this plugin, you must tell sqlquery what database to connect to: 65 57 66 In {{{trac.ini}}}(''or via the Web Admin''):58 In `trac.ini` (''or via the Web Admin''): 67 59 68 60 {{{ … … 70 62 uri = mysql://user:password@hostname/database 71 63 }}} 64 You can also use oracle or sqlite: 72 65 73 You can also use oracle or sqlite:74 66 {{{ 75 uri = oracle://user:password@tns :/67 uri = oracle://user:password@tns 76 68 or 77 69 uri = sqlite:///path/to/db 78 70 }}} 79 80 71 == Feedback == 81 82 72 Please give your feedback (''anything that shouldn't be a ticket'') [wiki:SqlQueryMacro/Feedback here] 83 73 84 74 == Recent Changes == 85 86 75 [[ChangeLog(sqlquerymacro, 3)]] 87 76 88 77 == Author/Contributors == 89 90 '''Author:''' [wiki:JamesMills] [[BR]] 91 '''Maintainer:''' [wiki:JamesMills] [[BR]] 92 '''Contributors:''' 78 '''Author:''' JamesMills [[BR]] '''Maintainer:''' JamesMills [[BR]] '''Contributors:'''