wiki:SqlQueryMacro

Execute an SQL Query from within Trac

Notice: This plugin is unmaintained and available for adoption.

Description

This plugin allows you to execute an SQL query against a configured database displaying a formatted table of results from within Trac.

This macro can be used in one of two ways:

{{{#!SQL
SELECT * FROM component
}}}

or:

[[SQL(SELECT * FROM component)]]

See also:

Bugs/Feature Requests

Existing bugs and feature requests for SqlQueryMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out SqlQueryMacro from here using Subversion, or browse the source with Trac.

Installation

To install the macro:

$ pip install svn+https://trac-hacks.org/svn/sqlquerymacro/1.0

or

$ pip install svn+https://trac-hacks.org/svn/sqlquerymacro/0.11

To enable in your trac.ini file:

[components]
sqlquery.* = enabled

Configuration

Configuration is only needed if using a datasource other than Trac's database. To configure this plugin, you must tell SQLQuery what database to connect to.

In trac.ini:

[sqlquery]
uri = sqlite:///path/to/db

The allowed database connection strings are those supported by Trac.

Recent Changes

18071 by rjollos on 2021-03-16 22:34:36
TracSqlQueryMacro 0.3dev: Remove pymills dependency

Patch by Jun Omae.

Fixes #12023.

17555 by rjollos on 2019-11-15 15:28:06
TracSqlQueryMacro 0.2: Fix incorrectly chained methods

Refs #13646.

17554 by rjollos on 2019-11-14 12:17:52
TracSqlQueryMacro 0.2: Use Trac's database API when querying Trac database

Refs #13646.

(more)

Author/Contributors

Author: JamesMills
Maintainer: none (needsadoption)
Contributors:

Last modified 3 years ago Last modified on Oct 13, 2021, 6:52:06 AM