Docs for DAL.executesql.im_class
Description
<class 'pydal.base.MetaDAL'> extends (<class 'pydal.helpers.classes.Serializable'>, <class 'pydal.helpers.classes.BasicStorage'>)
|
Attributes
DAL.executesql.im_class.Field |
<type 'type'> extends (<class 'pydal.objects.Expression'>, <class 'pydal.helpers.classes.Serializable'>)
belongs to class <type 'type'>
|
DAL.executesql.im_class.Row |
<type 'type'> extends (<class 'pydal.helpers.classes.BasicStorage'>,)
belongs to class <type 'type'>
A dictionary that lets you do d['a'] as well as d.a this is only used to store a `Row` |
DAL.executesql.im_class.Table |
<type 'type'> extends (<class 'pydal.helpers.classes.Serializable'>, <class 'pydal.helpers.classes.BasicStorage'>)
belongs to class <type 'type'>
Represents a database table Example:: You can create a table as:: db = DAL(...) db.define_table('users', Field('name')) And then:: db.users.insert(name='me') # print db.users._insert(...) to see SQL db.users.drop() |
DAL.executesql.im_class.__call__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__class__ |
<type 'type'> extends (<type 'type'>,)
belongs to class <type 'type'>
|
DAL.executesql.im_class.__contains__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__delattr__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__delattr__('name') <==> del x.name |
DAL.executesql.im_class.__delitem__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__dict__ |
<type 'dictproxy'>
belongs to class <type 'dictproxy'>
|
DAL.executesql.im_class.__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.executesql.im_class.__format__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
default object formatter |
DAL.executesql.im_class.__getattr__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__getattribute__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__getattribute__('name') <==> x.name |
DAL.executesql.im_class.__getitem__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__hash__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__hash__() <==> hash(x) |
DAL.executesql.im_class.__init__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__iter__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__module__ |
<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.executesql.im_class.__new__ |
<type 'function'>
belongs to class <type 'function'>
|
DAL.executesql.im_class.__nonzero__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__reduce__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
helper for pickle |
DAL.executesql.im_class.__reduce_ex__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
helper for pickle |
DAL.executesql.im_class.__repr__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__setattr__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__setitem__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__setattr__('name', value) <==> x.name = value |
DAL.executesql.im_class.__sizeof__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
__sizeof__() -> int size of object in memory, in bytes |
DAL.executesql.im_class.__str__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.__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). |
DAL.executesql.im_class.__weakref__ |
<type 'getset_descriptor'>
belongs to class <type 'getset_descriptor'>
list of weak references to the object (if defined) |
DAL.executesql.im_class._remove_references_to |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.as_dict |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.as_json |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.as_xml |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.as_yaml |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.can_join |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.check_reserved_keyword |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Validates `name` against SQL keywords Uses self.check_reserve which is a list of operators to use. |
DAL.executesql.im_class.clear |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.close |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.commit |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.copy |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.define_table |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.distributed_transaction_begin |
<type 'function'>
belongs to class <type 'function'>
|
DAL.executesql.im_class.distributed_transaction_commit |
<type 'function'>
belongs to class <type 'function'>
|
DAL.executesql.im_class.executesql |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Executes an arbitrary query Args: query (str): the query to submit to the backend placeholders: is optional and will always be None. 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. as_dict: 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. Results returned with as_dict=True are the same as those returned when applying .to_list() to a DAL query. If "as_ordered_dict"=True the behaviour is the same as when "as_dict"=True with the keys (field names) guaranteed to be in the same order as returned by the select name executed on the database. fields: list of DAL Fields that match the fields returned from the DB. The Field objects should be part of one or more Table objects defined on the DAL object. The "fields" list can include one or more DAL Table objects in addition to or instead of including Field objects, or it can be just a single table (not in a list). In that case, the Field objects will be extracted from the table(s). Note: if either `fields` or `colnames` is provided, the results will be converted to a DAL `Rows` object using the `db._adapter.parse()` method colnames: list of field names in tablename.fieldname format Note: It is also possible to specify both "fields" and the associated "colnames". In that case, "fields" can also include DAL Expression objects in addition to Field objects. For Field objects in "fields", the associated "colnames" must still be in tablename.fieldname format. For Expression objects in "fields", the associated "colnames" can be any arbitrary labels. DAL Table objects referred to by "fields" or "colnames" can be dummy tables and do not have to represent any real tables in the database. Also, note that the "fields" and "colnames" must be in the same order as the fields in the results cursor returned from the DB. |
DAL.executesql.im_class.export_to_csv_file |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.get |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.get_instances |
<type 'function'>
belongs to class <type 'function'>
Returns a dictionary with uri as key with timings and defined tables:: {'sqlite://storage.sqlite': { 'dbstats': [(select auth_user.email from auth_user, 0.02009)], 'dbtables': { 'defined': ['auth_cas', 'auth_event', 'auth_group', 'auth_membership', 'auth_permission', 'auth_user'], 'lazy': '[]' } } } |
DAL.executesql.im_class.has_key |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.has_representer |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.import_from_csv_file |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.import_table_definitions |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.items |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.iteritems |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.iterkeys |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.itervalues |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.keys |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.lazy_define_table |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.logger |
<class 'logging.Logger'>
belongs to class <class 'logging.Logger'>
Instances of the Logger class represent a single logging channel. A "logging channel" indicates an area of an application. Exactly how an "area" is defined is up to the application developer. Since an application can have any number of areas, logging channels are identified by a unique string. Application areas can be nested (e.g. an area of "input processing" might include sub-areas "read CSV files", "read XLS files" and "read Gnumeric files"). To cater for this natural nesting, channel names are organized into a namespace hierarchy where levels are separated by periods, much like the Java or Python package namespace. So in the instance given above, channel names might be "input" for the upper level, and "input.csv", "input.xls" and "input.gnu" for the sub-levels. There is no arbitrary limit to the depth of nesting. |
DAL.executesql.im_class.parse_as_rest |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Example: Use as:: db.define_table('person',Field('name'),Field('info')) db.define_table('pet', Field('ownedby',db.person), Field('name'),Field('info') ) @request.restful() def index(): def GET(*args,**vars): patterns = [ "/friends[person]", "/{person.name}/:field", "/{person.name}/pets[pet.ownedby]", "/{person.name}/pets[pet.ownedby]/{pet.name}", "/{person.name}/pets[pet.ownedby]/{pet.name}/:field", ("/dogs[pet]", db.pet.info=='dog'), ("/dogs[pet]/{pet.name.startswith}", db.pet.info=='dog'), ] parser = db.parse_as_rest(patterns,args,vars) if parser.status == 200: return dict(content=parser.response) else: raise HTTP(parser.status,parser.error) def POST(table_name,**vars): if table_name == 'person': return db.person.validate_and_insert(**vars) elif table_name == 'pet': return db.pet.validate_and_insert(**vars) else: raise HTTP(400) return locals() |
DAL.executesql.im_class.pop |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.represent |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.representers |
<type 'dict'>
belongs to class <type 'dict'>
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
DAL.executesql.im_class.rollback |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.serializers |
<type 'dict'>
belongs to class <type 'dict'>
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
DAL.executesql.im_class.set_folder |
<type 'function'>
belongs to class <type 'function'>
|
DAL.executesql.im_class.smart_query |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.tables |
<type 'property'>
belongs to class <type 'property'>
|
DAL.executesql.im_class.update |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.uuid |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.validators |
<type 'NoneType'>
belongs to class <type 'NoneType'>
|
DAL.executesql.im_class.validators_method |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Field type validation, using web2py's validators mechanism. makes sure the content of a field is in line with the declared fieldtype |
DAL.executesql.im_class.values |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
DAL.executesql.im_class.where |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|