This is in further extension to this.
I am building project in pyramid using sqlalchemy without its ORM. I find the session feature to be nice as I wont have to commit everytime a request is over.This is how I am implementing it:
from sqlalchemy.orm import (
scoped_session,
sessionmaker,
)
from zope.sqlalchemy import ZopeTransactionExtension
DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
Question:To execute only SQL statement do i need to create a session?
If yes,how can I execute sqlstatement using DBSession.
If no,how can I do the same and take care of all the functionality offered by session and zopeTransactionExtension()