Chapter 10.2.1. Basic Connection Management

Every access to the database requires a DB connection. From the user’s point of view, a connection is how you tell SQLObject to locate your database. It resembles a URI in the following format:

scheme://[user[:password]@]host[:port]/database[?parameters]

The connection is the only place where you specify the actual database you use. The rest of your data access code is totally DB-agnostic. Unfortunately, SQLObject doesn’t provide a perfect abstraction; sometimes you need to consider the features of the underlying database you are using. Some databases don’t support some features, or you might want to write a highly tuned query with database-specific features. With that said, SQLObject does a ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.