On 4/27/06, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Apr 27, 2006, at 6:15 PM, Jon Rosebaugh wrote:
> > Yeah, that makes sense, I guess. I just expected SA to be able to read
> > out what it itself had put into the database.
> >
>
> it does. theres unit tests that pass. can you attach a test case
> that fails ?
from sqlalchemy import *
import time
pages = Table('pages',
Column('page_id', Integer, primary_key=True),
Column('name', Unicode(60), nullable=False),
Column('data', Unicode, nullable=True),
Column('timestamp', DateTime, nullable=False)
)
class Page(object):
def __init__(self, page_id=None, name=None, data=None, timestamp=None):
self.page_id = page_id
self.name = name
self.data = data
self.timestamp = timestamp
assign_mapper(Page, pages)
global_connect('sqlite://filename=test.db')
pages.create()
SamplePage = Page(name=u"SamplePage", data=u"""This is a sample
page""", timestamp=time.time())
objectstore.commit()
objectstore.clear()
p = Page.get_by(name=u"SamplePage")
print p.data
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users