Edgewall Software

Changes between Version 3 and Version 4 of SqlAlchemy


Ignore:
Timestamp:
Feb 28, 2015, 12:08:59 PM (9 years ago)
Author:
figaro
Comment:

Added SQLAlchemy script

Legend:

Unmodified
Added
Removed
Modified
  • SqlAlchemy

    v3 v4  
    11= SQLAlchemy =
    22
    3 [http://www.sqlalchemy.org SqlAlchemy] is an object-oriented DB API for Python.
     3[http://www.sqlalchemy.org SqlAlchemy] is an object-oriented DB API for Python. From the website:
    44
    55  ''SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.''
     
    77  ''It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.''
    88
    9 ----
     9We talked a bit about adopting it for Trac's DB abstraction layer, eventually replacing our home grown [source:trunk/trac/db db layer]. A proposal has been worked on: trac-dev:228
    1010
    11 We talked a bit about adopting it for Trac's DB abstraction layer, eventually replacing our home grown [source:trunk/trac/db db layer].
     11Some experimental work has started in source:sandbox/Attic/sqlalchemy-ng.
    1212
    13 Some experimental work has started in source:sandbox/Attic/sqlalchemy-ng
     13An installation consists of the following steps:
     14 1. Download and install [https://pypi.python.org/pypi/SQLAlchemy/0.9.8 Python egg SqlAlchemyQuery].
     15 1. Set some variables and formatting rules:
     16{{{
     17TRAC_PATH_REPLACE="my-trac-environment"
     18USER="myuser"
     19MAX_ROW_COUNT_REPLACE="1000"
     20TABLE_BORDER_REPLACE="border=\"1\""
     21}}}
     22 1. Copy the sorttable javascript to htdocs:
     23{{{
     24cp sorttable.js /home/$USER/$TRAC_PATH_REPLACE/htdocs
     25}}}
     26 1. Apply the settings in macro.py:
     27{{{
     28sed -i "s/TRAC_PATH_REPLACE/$TRAC_PATH_REPLACE/g" macro.py
     29sed -i "s/MAX_ROW_COUNT_REPLACE/$MAX_ROW_COUNT_REPLACE/g" macro.py
     30sed -i "s/TABLE_BORDER_REPLACE/$TABLE_BORDER_REPLACE/g" macro.py
     31}}}
     32 1. Unzip the egg and copy it to the plugins area:
     33{{{
     34cp SqlAlchemyQuery-0.1-py2.7.egg /home/$USER/$TRAC_PATH_REPLACE/plugins
     35mv SqlAlchemyQuery-0.1-py2.7.egg ../dist
     36}}}
     37 1. Reboot tracd.