[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] gnubg database interface
From: |
Joern Thyssen |
Subject: |
[Bug-gnubg] gnubg database interface |
Date: |
Sun, 4 Apr 2004 15:26:09 +0000 |
User-agent: |
Mutt/1.4.2.1i |
Hi,
I've had a first go at the gnubg database interface.
I've commited a file gnubg.sql, which contains the DDLs for the database
and tables.
I've also committed a file scripts/database.py for adding a match to the
database: with a match or session loaded in gnubg, execute:
load python scripts/database.py
At this stage, only the player information, match information and the
match statistics gets added to the database. Adding individual games and
individual moves is on the TODO list... An improved version with GUI
integration is also on the TODO list. I've no immediate plans for this,
so if someone volunters, please go ahead!
The database.py script uses the DB API v2 python modules. Currently the
script uses postgresql, but it should be almost trivial to substitute
with mysql, ODBC, DB2, etc. by changing:
import pgdb
conn = pgdb.connect(dsn=':gnubg')
to something else. Read more about DB API v2 at
<URL:http://www.python.org/topics/database/>, in particular
<URL:http://www.python.org/topics/database/modules.html>.
Comments appreciated!
Jørn
pgpvbvUm1F8Is.pgp
Description: PGP signature
- [Bug-gnubg] gnubg database interface,
Joern Thyssen <=