Module Import alias ImportFrom alias ImportFrom alias alias Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad orelse If CompareIs NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad orelse If CompareIs NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Return Call NameLoad NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad Return NameLoad decorator_list decorator_list ClassDef bases Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad orelse If CompareIs Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpOr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareEq Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A abc django.db.models.base ModelBase six string_types with_metaclass N/A querybuilder querybuilder.fields FieldFactory TableFactory N/A object N/A N/A 
    Creates the correct table class based on the type of the passed table
     __new__ N/A N/A cls table N/A args kwargs N/A N/A 
        Determines which type of table class to instantiate based on the table argument

        :param table: The table used in determining which type of Table object to return.
            This can be a string of the table name, a dict of {'alias': table},
            a ``Table`` instance, a django model class, or a Query instance
        :type table: str or dict or :class:`Table <querybuilder.tables.Table>` or
            :class:`ModelBase <django:django.db.models.base.ModelBase>`
            or :class:`Query <querybuilder.query.Query>`

        :returns: The Table instance if a valid type was determined, otherwise None
        :rtype: :class:`Table <querybuilder.tables.Table>` or None
         N/A table_type N/A type table N/A N/A table_type dict N/A N/A N/A N/A kwargs update alias N/A N/A list N/A N/A table keys N/A 0 N/A table N/A N/A list N/A N/A table values N/A 0 N/A table_type N/A type table N/A N/A isinstance table string_types N/A N/A N/A SimpleTable table kwargs N/A N/A N/A table_type ModelBase N/A N/A N/A ModelTable table kwargs N/A N/A N/A table_type N/A N/A querybuilder query Query N/A N/A N/A QueryTable table kwargs N/A N/A N/A isinstance table Table N/A N/A N/A key value N/A N/A kwargs items N/A N/A N/A setattr table key value N/A table N/A None N/A N/A Table N/A N/A with_metaclass N/A abc ABCMeta object N/A N/A 
    Abstract table class that all table types extend.

    Properties:

        name: str
            The name that identifies this table if there is no alias

        alias: str
            The optional alias used to identify this table

        auto_alias: str
            An alias that is set automatically by the Query if needed for inner query
            namespacing
     __init__ N/A N/A self table fields schema extract_fields prefix_fields field_prefix owner alias N/A None None None False False None None None N/A N/A 
        Initializes the table and sets default values

        :param table: The table name or model. This can be a string of the table
            name, a dict of {'alias': table}, a Query instance, or a django Model instance
        :type table: str or dict or :class:`Query <querybuilder.query.Query>` or
            :class:`ModelBase <django:django.db.models.base.ModelBase>`

        :param fields: The fields to select from ``table``. Defaults to '*'. This can be
            a single field, a tuple of fields, or a list of fields. Each field can be a string
            or ``Field`` instance
        :type fields: str or tuple or list or :class:`Field <querybuilder.fields.Field>`

        :param schema: This is not implemented, but it will be a string of the db schema name
        :type schema: str

        :param extract_fields: If True, then '*' fields will be converted to individual
            fields for each column in the table. Defaults to False.
        :type extract_fields: bool

        :param prefix_fields: If True, then the table will have each of its field names
            prefixed with the field_prefix. Defaults to False.
        :type prefix_fields: bool

        :param field_prefix: The field prefix to be used in front of each field name if prefix_fields
            is set to True.
        :type field_prefix: str

        :param owner: A reference to the query managing this Table object
        :type owner: :class:`Query <querybuilder.query.Query>`

        :param alias: An alias to be used for this table
        :type alias: str
         N/A N/A self table table N/A N/A self owner owner N/A N/A self name None N/A N/A self alias alias N/A N/A self auto_alias None N/A N/A self fields N/A N/A N/A self schema schema N/A N/A self extract_fields extract_fields N/A N/A self prefix_fields prefix_fields N/A N/A self field_prefix field_prefix N/A N/A N/A self init_defaults N/A fields N/A N/A N/A N/A self set_fields fields N/A init_defaults N/A N/A self N/A N/A N/A 
        Template method meant to be overridden by subclasses. This is called
        in the __init__ before calling set_fields
         N/A N/A get_sql N/A N/A self N/A N/A N/A 
        Gets the FROM sql portion for this table
        Ex: table_name AS alias

        :returns: Returns the table identifier to be used in the FROM sql portion of the query
        :rtype: str
         N/A alias N/A N/A self get_alias N/A alias N/A N/A N/A N/A {0} AS {1} format N/A N/A self get_from_name alias N/A N/A N/A self get_identifier N/A get_alias N/A N/A self N/A N/A N/A 
        Gets the alias for the table or the auto_alias if one is set.
        If there isn't any kind of alias, None is returned.

        :returns: The table alias, auto_alias, or None
        :rtype: str or None
         N/A alias None N/A N/A self alias N/A N/A alias N/A self alias N/A N/A N/A self auto_alias N/A N/A alias N/A self auto_alias N/A alias N/A get_name N/A N/A self N/A N/A N/A 
        Gets the name for the table and returns it. This identifies the table if there
        is not an alias set.

        :returns: The name for the table
        :rtype: str
         N/A N/A self name N/A get_from_name N/A N/A self N/A N/A N/A 
        Gets the name to be used in the FROM clause for the table. This is separate
        from the get_name() method so subclasses don't always have to reference
        the table name by the FROM name. Otherwise Table subclasses like a QueryTable
        would be using the full Query sql for the get_name when getting the identifier in
        other parts of the query.
         N/A N/A self name N/A get_identifier N/A N/A self N/A N/A N/A 
        Gets the name to reference the table within a query. If
        a table is aliased, it will return the alias, otherwise
        it returns the table name

        :returns: the name to reference the table within a query
        :rtype: str
         N/A alias N/A N/A self get_alias N/A alias N/A N/A alias N/A N/A N/A self get_name N/A add_field N/A N/A self field N/A N/A N/A 
        Adds a field to this table

        :param field: This can be a string of a field name, a dict of {'alias': field}, or
            a ``Field`` instance
        :type field: str or dict or Field
         N/A field N/A FieldFactory field N/A N/A N/A field set_table self N/A field_name N/A N/A field get_name N/A existing_field N/A self fields N/A N/A N/A N/A N/A existing_field get_name field_name N/A N/A None N/A N/A N/A self before_add_field field N/A N/A N/A field before_add N/A N/A N/A field ignore False N/A N/A N/A N/A N/A self fields append field N/A field N/A remove_field N/A N/A self field N/A N/A N/A 
        Removes a field from this table

        :param field: This can be a string of a field name, a dict of {'alias': field}, or
            a ``Field`` instance
        :type field: str or dict or :class:`Field <querybuilder.fields.Field>`
         N/A new_field N/A FieldFactory field N/A N/A N/A new_field set_table self N/A new_field_identifier N/A N/A new_field get_identifier N/A field N/A self fields N/A N/A N/A N/A N/A field get_identifier new_field_identifier N/A N/A N/A N/A N/A self fields remove field N/A field N/A None N/A before_add_field N/A N/A self field N/A N/A N/A 
        This is a template method meant to be extended by subclasses. It is called
        during the add_field method after the field is returned from the factory,
        and before calling the field's before_add method, which is before actually
        appending the field to the list of fields.
         N/A N/A set_fields N/A N/A self fields N/A N/A N/A 
        This will clear the table's current fields and add all new fields

        :param fields: The fields to select from ``table``. This can be
            a single field, a tuple of fields, or a list of fields. Each field can be a string
            or ``Field`` instance
        :type fields: str or tuple or list of str or list of Field or :class:`Field <querybuilder.fields.Field>`
         N/A N/A self fields N/A N/A N/A N/A self add_fields fields N/A add_fields N/A N/A self fields N/A N/A N/A 
        Adds all of the passed fields to the table's current field list

        :param fields: The fields to select from ``table``. This can be
            a single field, a tuple of fields, or a list of fields. Each field can be a string
            or ``Field`` instance
        :type fields: str or tuple or list of str or list of Field or :class:`Field <querybuilder.fields.Field>`
         N/A N/A isinstance fields string_types N/A N/A fields N/A fields N/A N/A N/A N/A type fields tuple N/A N/A fields N/A list fields N/A field_objects N/A N/A N/A self add_field field N/A field fields N/A field_objects N/A get_field_sql N/A N/A self N/A N/A N/A 
        Loop through this tables fields and calls the get_sql
        method on each of them to build the field list for the FROM
        clause

        :returns: A list of sql for each field in this table
        :rtype: list of str
         N/A N/A N/A N/A field get_sql N/A field N/A self fields N/A get_field_names N/A N/A self N/A N/A N/A 
        Loop through this tables fields and calls the get_name
        method on each of them to build a list of field names

        :returns: A list of field names found in this table
        :rtype: list of str
         N/A N/A N/A N/A field get_name N/A field N/A self fields N/A get_field_identifiers N/A N/A self N/A N/A N/A 
        Loop through this tables fields and calls the get_identifier
        method on each of them to build a list of field identifiers

        :returns: A list of field identifiers found in this table
        :rtype: list of str
         N/A N/A N/A N/A field get_identifier N/A field N/A self fields N/A get_field_prefix N/A N/A self N/A N/A N/A 
        Gets the prefix to be used in front of each field. If no prefix is
        set, then the identifier for this table is returned

        :returns: The field prefix for this table
        :rtype: str
         N/A N/A N/A self field_prefix N/A N/A self get_identifier N/A find_field N/A N/A self field alias N/A None None N/A N/A 
        Finds a field by name or alias.

        :param field: string of the field name or alias, dict of {'alias': field}, or a Field instance
        :type field: str or dict or Field

        :returns: The field if it is found, otherwise None
        :rtype: :class:`Field <querybuilder.fields.Field>` or None
         N/A alias N/A N/A field alias N/A field N/A FieldFactory field table self alias alias N/A identifier N/A N/A field get_identifier N/A field N/A self fields N/A N/A N/A N/A N/A field get_identifier identifier N/A N/A field N/A None N/A N/A SimpleTable N/A Table N/A N/A 
    A table that is created with just the string name of the table
     init_defaults N/A N/A self N/A N/A N/A 
        Sets the name of the table to the passed in table value
         N/A N/A N/A N/A super SimpleTable self init_defaults N/A N/A self name N/A self table N/A N/A ModelTable N/A Table N/A N/A 
    A table that is created by passing a django model for the table field. This allows
    fields to be extract and for joins to be made without specifying a condition.
     init_defaults N/A N/A self N/A N/A N/A 
        Sets a model instance variable to the table value and sets the name to the
        table name as determined from the model class
         N/A N/A N/A N/A super ModelTable self init_defaults N/A N/A self model N/A self table N/A N/A self name N/A N/A N/A self model _meta db_table N/A before_add_field N/A N/A self field N/A N/A N/A 
        If extract_fields is set to True, then '*' fields will be removed and each
        individual field will read from the model meta data and added.
         N/A N/A N/A self extract_fields N/A N/A field name * N/A N/A N/A field ignore True N/A fields N/A N/A model_field column N/A model_field N/A N/A N/A self model _meta fields N/A N/A N/A self add_fields fields N/A N/A QueryTable N/A Table N/A N/A 
    A table that contains a Query object. This is used for inner queries in more complex
    queries, usually involving window functions or some sort of aggregation.
     init_defaults N/A N/A self N/A N/A N/A 
        Sets a query instance variable to the table value
         N/A N/A N/A N/A super QueryTable self init_defaults N/A N/A self query N/A self table N/A N/A N/A self query is_inner True N/A get_sql N/A N/A self N/A N/A N/A N/A N/A self get_identifier N/A get_from_name N/A N/A self N/A N/A N/A 
        Return the query sql in the FROM clause of the query when building the table sql
         N/A N/A N/A ({0}) format N/A N/A N/A self query get_sql N/A get_with_sql N/A N/A self N/A N/A N/A N/A N/A {0} AS ({1}) format N/A N/A self get_identifier N/A N/A N/A self query get_sql N/A N/A