Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | DAL
an instance of this class represents a database connection
Example:
db = DAL('sqlite://test.db') db.define_table('tablename', Field('fieldname1'), Field('fieldname2'))
|
|||
Field an instance of this class represents a database field |
|||
Table an instance of this class represents a database table |
|
|||
new empty dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|||
|
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
iter(x)
|
x[y]
|
x[i]=y
|
x.__setattr__('name', value) <==> x.name = value
|
repr(x)
|
placeholders is optional and will always be None when using DAL if using raw SQL with placeholders, placeholders may be a sequence of values to be substituted in or, *if supported by the DB driver*, a dictionary with keys matching named placeholders in your SQL. Added 2009-12-05 "as_dict" optional argument. Will always be None when using DAL. If using raw SQL can be set to True and the results cursor returned by the DB driver will be converted to a sequence of dictionaries keyed with the db field names. Tested with SQLite but should work with any database since the cursor.description used to get field names is part of the Python dbi 2.0 specs. Results returned with as_dict = True are the same as those returned when applying .to_list() to a DAL query. [{field1: value1, field2: value2}, {field1: value1b, field2: value2b}] --bmeredyk |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 3 10:53:18 2010 | http://epydoc.sourceforge.net |