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