Docs for DAL.__subclasshook__
Description
<type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). |
Attributes
DAL.__subclasshook__.__call__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__call__(...) <==> x(...) |
DAL.__subclasshook__.__class__ |
<type 'type'> extends (<type 'object'>,)
belongs to class <type 'type'>
<attribute '__doc__' of 'builtin_function_or_method' objects> |
DAL.__subclasshook__.__cmp__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__cmp__(y) <==> cmp(x,y) |
DAL.__subclasshook__.__delattr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__delattr__('name') <==> del x.name |
DAL.__subclasshook__.__doc__ |
<type 'str'>
belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. |
DAL.__subclasshook__.__eq__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__eq__(y) <==> x==y |
DAL.__subclasshook__.__format__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
default object formatter |
DAL.__subclasshook__.__ge__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__ge__(y) <==> x>=y |
DAL.__subclasshook__.__getattribute__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__getattribute__('name') <==> x.name |
DAL.__subclasshook__.__gt__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__gt__(y) <==> x>y |
DAL.__subclasshook__.__hash__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__hash__() <==> hash(x) |
DAL.__subclasshook__.__init__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__init__(...) initializes x; see help(type(x)) for signature |
DAL.__subclasshook__.__le__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__le__(y) <==> x<=y |
DAL.__subclasshook__.__lt__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__lt__(y) <==> x<y |
DAL.__subclasshook__.__module__ |
<type 'NoneType'>
belongs to class <type 'NoneType'>
|
DAL.__subclasshook__.__name__ |
<type 'str'>
belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. |
DAL.__subclasshook__.__ne__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__ne__(y) <==> x!=y |
DAL.__subclasshook__.__new__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T |
DAL.__subclasshook__.__reduce__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
helper for pickle |
DAL.__subclasshook__.__reduce_ex__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
helper for pickle |
DAL.__subclasshook__.__repr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__repr__() <==> repr(x) |
DAL.__subclasshook__.__self__ |
<class 'pydal.base.MetaDAL'> extends (<class 'pydal.helpers.classes.Serializable'>, <class 'pydal.helpers.classes.BasicStorage'>)
belongs to class <class 'pydal.base.MetaDAL'>
An instance of this class represents a database connection Args: uri(str): contains information for connecting to a database. Defaults to `'sqlite://dummy.db'` Note: experimental: you can specify a dictionary as uri parameter i.e. with:: db = DAL({"uri": "sqlite://storage.sqlite", "tables": {...}, ...}) for an example of dict input you can check the output of the scaffolding db model with db.as_dict() Note that for compatibility with Python older than version 2.6.5 you should cast your dict input keys to str due to a syntax limitation on kwarg names. for proper DAL dictionary input you can use one of:: obj = serializers.cast_keys(dict, [encoding="utf-8"]) #or else (for parsing json input) obj = serializers.loads_json(data, unicode_keys=False) pool_size: How many open connections to make to the database object. folder: where .table files will be created. Automatically set within web2py. Use an explicit path when using DAL outside web2py db_codec: string encoding of the database (default: 'UTF-8') table_hash: database identifier with .tables. If your connection hash change you can still using old .tables if they have db_hash as prefix check_reserved: list of adapters to check tablenames and column names against sql/nosql reserved keywords. Defaults to `None` - 'common' List of sql keywords that are common to all database types such as "SELECT, INSERT". (recommended) - 'all' Checks against all known SQL keywords - '<adaptername>'' Checks against the specific adapters list of keywords - '<adaptername>_nonreserved' Checks against the specific adapters list of nonreserved keywords. (if available) migrate: sets default migrate behavior for all tables fake_migrate: sets default fake_migrate behavior for all tables migrate_enabled: If set to False disables ALL migrations fake_migrate_all: If set to True fake migrates ALL tables attempts: Number of times to attempt connecting auto_import: If set to True, tries import automatically table definitions from the databases folder (works only for simple models) bigint_id: If set, turn on bigint instead of int for id and reference fields lazy_tables: delays table definition until table access after_connection: can a callable that will be executed after the connection Example: Use as:: db = DAL('sqlite://test.db') or:: db = DAL(**{"uri": ..., "tables": [...]...}) # experimental db.define_table('tablename', Field('fieldname1'), Field('fieldname2')) |
DAL.__subclasshook__.__setattr__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__setattr__('name', value) <==> x.name = value |
DAL.__subclasshook__.__sizeof__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
__sizeof__() -> int size of object in memory, in bytes |
DAL.__subclasshook__.__str__ |
<type 'method-wrapper'>
belongs to class <type 'method-wrapper'>
x.__str__() <==> str(x) |
DAL.__subclasshook__.__subclasshook__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached). |