sphinx_django/db_script.py
author Puneeth Chaganti <punchagan@fossee.in>
Sun, 30 Jan 2011 12:41:10 +0530
changeset 5 c263a26867d4
parent 0 54f784230511
permissions -rw-r--r--
Add a .hgingore file

from sqlalchemy import *

db = create_engine('sqlite:///test.db')

db.echo = False  # Try changing this to True and see what happens

metadata = MetaData(db)

chapter = Table('Chapter', metadata,
    Column('id', Integer, primary_key=True),
    Column('name', String(40)),
)
chapter.create()

i = chapter.insert()
i.execute(name='basic_func')