SYMBOL INDEX (4557 symbols across 86 files) FILE: bench.py class Base (line 12) | class Base(Model): class Meta (line 13) | class Meta: class Register (line 16) | class Register(Base): class Collection (line 19) | class Collection(Base): class Item (line 22) | class Item(Base): function timed (line 29) | def timed(fn): function populate_register (line 41) | def populate_register(s, n): function populate_collections (line 45) | def populate_collections(n, n_i): function insert (line 52) | def insert(i): function batch_insert (line 57) | def batch_insert(i): function bulk_insert (line 63) | def bulk_insert(i): function bulk_create (line 70) | def bulk_create(i): function select (line 76) | def select(i): function select_related_dbapi_raw (line 82) | def select_related_dbapi_raw(i): function insert_related (line 89) | def insert_related(i): function select_related (line 94) | def select_related(i): function select_related_left (line 100) | def select_related_left(i): function select_related_dicts (line 106) | def select_related_dicts(i): function select_related_objects (line 112) | def select_related_objects(i): function select_prefetch (line 118) | def select_prefetch(i): function select_prefetch_join (line 125) | def select_prefetch_join(i): FILE: docs/clubdata.sql type bookings (line 24) | CREATE TABLE bookings ( type facilities (line 38) | CREATE TABLE facilities ( type members (line 53) | CREATE TABLE members ( type bookings (line 4236) | CREATE INDEX "bookings.memid_facid" type bookings (line 4241) | CREATE INDEX "bookings.facid_memid" type bookings (line 4246) | CREATE INDEX "bookings.facid_starttime" type bookings (line 4251) | CREATE INDEX "bookings.memid_starttime" type bookings (line 4256) | CREATE INDEX "bookings.starttime" type members (line 4261) | CREATE INDEX "members.joindate" type members (line 4266) | CREATE INDEX "members.recommendedby" FILE: examples/adjacency_list.py class Node (line 6) | class Node(Model): class Meta (line 10) | class Meta: method __str__ (line 13) | def __str__(self): method dump (line 16) | def dump(self, _indent=0): FILE: examples/analytics/app.py class BaseModel (line 54) | class BaseModel(Model): class Meta (line 55) | class Meta: class Account (line 59) | class Account(BaseModel): method verify_url (line 62) | def verify_url(self, url): class PageView (line 68) | class PageView(BaseModel): method create_from_request (line 79) | def create_from_request(cls, account, request): function analyze (line 94) | def analyze(): function script (line 119) | def script(): function not_found (line 129) | def not_found(e): function before_request (line 137) | def before_request(): function after_request (line 143) | def after_request(response): FILE: examples/analytics/reports.py class Report (line 8) | class Report(object): method __init__ (line 9) | def __init__(self, account_id=DEFAULT_ACCOUNT_ID): method get_query (line 13) | def get_query(self): method top_pages_by_time_period (line 19) | def top_pages_by_time_period(self, interval='day'): method cookies (line 40) | def cookies(self): method user_agents (line 49) | def user_agents(self): method languages (line 61) | def languages(self): method trail (line 79) | def trail(self): method _referrer_clause (line 93) | def _referrer_clause(self, domain_only=True): method top_referrers (line 99) | def top_referrers(self, domain_only=True): method referrers_for_url (line 110) | def referrers_for_url(self, domain_only=True): method referrers_to_url (line 118) | def referrers_to_url(self, domain_only=True): FILE: examples/anomaly_detection.py class Reg (line 7) | class Reg(Model): class Meta (line 11) | class Meta: class StdDev (line 20) | class StdDev(object): method __init__ (line 21) | def __init__(self): method step (line 25) | def step(self, value): method finalize (line 29) | def finalize(self): FILE: examples/blog/app.py class Entry (line 59) | class Entry(flask_db.Model): method html_content (line 67) | def html_content(self): method save (line 83) | def save(self, *args, **kwargs): method update_search_index (line 93) | def update_search_index(self): method public (line 113) | def public(cls): method drafts (line 117) | def drafts(cls): method search (line 121) | def search(cls, query): class FTSEntry (line 140) | class FTSEntry(FTSModel): class Meta (line 143) | class Meta: function login_required (line 146) | def login_required(fn): function login (line 155) | def login(): function logout (line 171) | def logout(): function index (line 178) | def index(): function _create_or_edit (line 195) | def _create_or_edit(entry, template): function create (line 221) | def create(): function drafts (line 226) | def drafts(): function detail (line 231) | def detail(slug): function edit (line 241) | def edit(slug): function clean_querystring (line 246) | def clean_querystring(request_args, *keys_to_remove, **new_values): function not_found (line 259) | def not_found(exc): function main (line 262) | def main(): FILE: examples/diary.py class Entry (line 16) | class Entry(Model): class Meta (line 20) | class Meta: function initialize (line 24) | def initialize(passphrase): function menu_loop (line 29) | def menu_loop(): function add_entry (line 39) | def add_entry(): function view_entries (line 48) | def view_entries(search_query=None): function search_entries (line 70) | def search_entries(): FILE: examples/graph.py class Base (line 7) | class Base(Model): class Meta (line 8) | class Meta: class Node (line 12) | class Node(Base): method outgoing (line 15) | def outgoing(self): method incoming (line 22) | def incoming(self): class Edge (line 30) | class Edge(Base): function bellman_ford (line 54) | def bellman_ford(s): function print_path (line 78) | def print_path(s, e): FILE: examples/hexastore.py class Hexastore (line 10) | class Hexastore(object): method __init__ (line 11) | def __init__(self, database=':memory:', **options): method get_model (line 23) | def get_model(self): method store (line 39) | def store(self, s, p, o): method store_many (line 42) | def store_many(self, items): method delete (line 46) | def delete(self, s, p, o): method query (line 51) | def query(self, s=None, p=None, o=None): method search (line 57) | def search(self, *conditions): class _VariableFactory (line 94) | class _VariableFactory(object): method __getattr__ (line 95) | def __getattr__(self, name): class Variable (line 99) | class Variable(object): method __init__ (line 102) | def __init__(self, name): method __hash__ (line 105) | def __hash__(self): method __repr__ (line 108) | def __repr__(self): FILE: examples/query_library.py class BaseModel (line 10) | class BaseModel(Model): class Meta (line 11) | class Meta: class Member (line 14) | class Member(BaseModel): class Meta (line 25) | class Meta: class Facility (line 33) | class Facility(BaseModel): class Meta (line 41) | class Meta: class Booking (line 45) | class Booking(BaseModel): class Meta (line 52) | class Meta: FILE: examples/reddit_ranking.py function log (line 11) | def log(n, b): class Base (line 14) | class Base(Model): class Meta (line 15) | class Meta: class Post (line 18) | class Post(Base): FILE: examples/sqlite_fts_compression.py class SearchIndex (line 13) | class SearchIndex(FTSModel): class Meta (line 16) | class Meta: function _zlib_compress (line 21) | def _zlib_compress(data): function _zlib_decompress (line 28) | def _zlib_decompress(data): FILE: examples/twitter/app.py class BaseModel (line 31) | class BaseModel(Model): class Meta (line 32) | class Meta: class User (line 36) | class User(BaseModel): method following (line 44) | def following(self): method followers (line 52) | def followers(self): method is_following (line 59) | def is_following(self, user): method gravatar_url (line 67) | def gravatar_url(self, size=80): class Relationship (line 76) | class Relationship(BaseModel): class Meta (line 80) | class Meta: class Message (line 90) | class Message(BaseModel): function create_tables (line 97) | def create_tables(): function auth_user (line 104) | def auth_user(user): function get_current_user (line 111) | def get_current_user(): function login_required (line 118) | def login_required(f): function object_list (line 128) | def object_list(template_name, qr, var_name='object_list', **kwargs): function get_object_or_404 (line 139) | def get_object_or_404(model, *expressions): function is_following (line 149) | def is_following(from_user, to_user): function before_request (line 155) | def before_request(): function teardown_request (line 159) | def teardown_request(exc=None): function homepage (line 165) | def homepage(): function private_timeline (line 174) | def private_timeline(): function public_timeline (line 186) | def public_timeline(): function join (line 192) | def join(): function login (line 214) | def login(): function logout (line 230) | def logout(): function following (line 237) | def following(): function followers (line 243) | def followers(): function user_list (line 248) | def user_list(): function user_detail (line 253) | def user_detail(username): function user_follow (line 266) | def user_follow(username): function user_unfollow (line 281) | def user_unfollow(username): function create (line 294) | def create(): function _inject_user (line 307) | def _inject_user(): FILE: peewee.py function reraise (line 161) | def reraise(tp, value, tb=None): function utcfromtimestamp (line 171) | def utcfromtimestamp(ts): function utcnow (line 175) | def utcnow(): function datetime_adapter (line 187) | def datetime_adapter(d): return d.isoformat(' ') function convert_date (line 188) | def convert_date(d): return datetime.date(*map(int, d.split(b'-'))) function convert_timestamp (line 189) | def convert_timestamp(t): function _sqlite_date_part (line 232) | def _sqlite_date_part(lookup_type, datetime_string): function _sqlite_date_trunc (line 239) | def _sqlite_date_trunc(lookup_type, datetime_string): function _sqlite_regexp (line 246) | def _sqlite_regexp(regex, value): function __deprecated__ (line 252) | def __deprecated__(s): class attrdict (line 256) | class attrdict(dict): method __getattr__ (line 257) | def __getattr__(self, attr): method __setattr__ (line 262) | def __setattr__(self, attr, value): self[attr] = value method __iadd__ (line 263) | def __iadd__(self, rhs): self.update(rhs); return self method __add__ (line 264) | def __add__(self, rhs): d = attrdict(self); d.update(rhs); return d function with_metaclass (line 388) | def with_metaclass(meta, base=object): function merge_dict (line 391) | def merge_dict(source, overrides): function quote (line 397) | def quote(path, quote_chars): function ensure_tuple (line 404) | def ensure_tuple(value): function ensure_entity (line 408) | def ensure_entity(value): function make_snake_case (line 412) | def make_snake_case(s): function make_identifier (line 416) | def make_identifier(s): function chunked (line 422) | def chunked(it, n): class _callable_context_manager (line 431) | class _callable_context_manager(object): method __call__ (line 432) | def __call__(self, fn): class Proxy (line 440) | class Proxy(object): method __init__ (line 446) | def __init__(self): method initialize (line 450) | def initialize(self, obj): method attach_callback (line 455) | def attach_callback(self, callback): method passthrough (line 459) | def passthrough(method): method __getattr__ (line 470) | def __getattr__(self, attr): method __setattr__ (line 475) | def __setattr__(self, attr, value): class DatabaseProxy (line 481) | class DatabaseProxy(Proxy): method connection_context (line 487) | def connection_context(self): method atomic (line 489) | def atomic(self, *args, **kwargs): method manual_commit (line 491) | def manual_commit(self): method transaction (line 493) | def transaction(self, *args, **kwargs): method savepoint (line 495) | def savepoint(self): method Model (line 498) | def Model(self): class ModelDescriptor (line 505) | class ModelDescriptor(object): pass class AliasManager (line 511) | class AliasManager(object): method __init__ (line 514) | def __init__(self): method mapping (line 522) | def mapping(self): method add (line 525) | def add(self, source): method get (line 531) | def get(self, source, any_depth=False): method __getitem__ (line 538) | def __getitem__(self, source): method __setitem__ (line 541) | def __setitem__(self, source, alias): method push (line 544) | def push(self): method pop (line 549) | def pop(self): class State (line 556) | class State(collections.namedtuple('_State', ('scope', 'parentheses', method __new__ (line 558) | def __new__(cls, scope=SCOPE_NORMAL, parentheses=False, **kwargs): method __call__ (line 561) | def __call__(self, scope=None, parentheses=None, **kwargs): method __getattr__ (line 575) | def __getattr__(self, attr_name): function __scope_context__ (line 579) | def __scope_context__(scope): class Context (line 587) | class Context(object): method __init__ (line 590) | def __init__(self, **settings): method as_new (line 597) | def as_new(self): method column_sort_key (line 600) | def column_sort_key(self, item): method scope (line 604) | def scope(self): method parentheses (line 608) | def parentheses(self): method subquery (line 612) | def subquery(self): method __call__ (line 615) | def __call__(self, **overrides): method __enter__ (line 629) | def __enter__(self): method __exit__ (line 634) | def __exit__(self, exc_type, exc_val, exc_tb): method push_alias (line 640) | def push_alias(self): method sql (line 645) | def sql(self, obj): method literal (line 653) | def literal(self, keyword): method value (line 657) | def value(self, value, converter=None, add_param=True): method __sql__ (line 682) | def __sql__(self, ctx): method parse (line 687) | def parse(self, node): method query (line 690) | def query(self): function query_to_string (line 694) | def query_to_string(query): function _query_val_transform (line 714) | def _query_val_transform(v): class Node (line 737) | class Node(object): method clone (line 741) | def clone(self): method __sql__ (line 746) | def __sql__(self, ctx): method copy (line 750) | def copy(method): method coerce (line 757) | def coerce(self, _coerce=True): method is_alias (line 764) | def is_alias(self): method unwrap (line 767) | def unwrap(self): class ColumnFactory (line 771) | class ColumnFactory(object): method __init__ (line 774) | def __init__(self, node): method __getattr__ (line 777) | def __getattr__(self, attr): class _DynamicColumn (line 782) | class _DynamicColumn(object): method __get__ (line 785) | def __get__(self, instance, instance_type=None): class _ExplicitColumn (line 791) | class _ExplicitColumn(object): method __get__ (line 794) | def __get__(self, instance, instance_type=None): class Star (line 802) | class Star(Node): method __init__ (line 803) | def __init__(self, source): method __sql__ (line 805) | def __sql__(self, ctx): class Source (line 809) | class Source(Node): method __init__ (line 812) | def __init__(self, alias=None): method alias (line 817) | def alias(self, name): method select (line 820) | def select(self, *columns): method __star__ (line 826) | def __star__(self): method join (line 829) | def join(self, dest, join_type=JOIN.INNER, on=None): method left_outer_join (line 832) | def left_outer_join(self, dest, on=None): method cte (line 835) | def cte(self, name, recursive=False, columns=None, materialized=None): method get_sort_key (line 839) | def get_sort_key(self, ctx): method apply_alias (line 844) | def apply_alias(self, ctx): method apply_column (line 853) | def apply_column(self, ctx): class _HashableSource (line 859) | class _HashableSource(object): method __init__ (line 860) | def __init__(self, *args, **kwargs): method alias (line 865) | def alias(self, name): method _update_hash (line 869) | def _update_hash(self): method _get_hash (line 872) | def _get_hash(self): method __hash__ (line 875) | def __hash__(self): method __eq__ (line 878) | def __eq__(self, other): method __ne__ (line 883) | def __ne__(self, other): method _e (line 888) | def _e(op): function __bind_database__ (line 898) | def __bind_database__(meth): function __join__ (line 908) | def __join__(join_type=JOIN.INNER, inverted=False): class BaseTable (line 916) | class BaseTable(Source): class _BoundTableContext (line 929) | class _BoundTableContext(object): method __init__ (line 930) | def __init__(self, table, database): method __call__ (line 934) | def __call__(self, fn): method __enter__ (line 941) | def __enter__(self): method __exit__ (line 948) | def __exit__(self, exc_type, exc_val, exc_tb): class Table (line 954) | class Table(_HashableSource, BaseTable): method __init__ (line 955) | def __init__(self, name, columns=None, primary_key=None, schema=None, method clone (line 978) | def clone(self): method bind (line 989) | def bind(self, database=None): method bind_ctx (line 993) | def bind_ctx(self, database=None): method _get_hash (line 996) | def _get_hash(self): method select (line 1000) | def select(self, *columns): method insert (line 1006) | def insert(self, insert=None, columns=None, **kwargs): method replace (line 1015) | def replace(self, insert=None, columns=None, **kwargs): method update (line 1021) | def update(self, update=None, **kwargs): method delete (line 1030) | def delete(self): method __sql__ (line 1033) | def __sql__(self, ctx): class Join (line 1049) | class Join(BaseTable): method __init__ (line 1050) | def __init__(self, lhs, rhs, join_type=JOIN.INNER, on=None, alias=None): method on (line 1057) | def on(self, predicate): method __sql__ (line 1061) | def __sql__(self, ctx): class ValuesList (line 1071) | class ValuesList(_HashableSource, BaseTable): method __init__ (line 1072) | def __init__(self, values, columns=None, alias=None): method _get_hash (line 1077) | def _get_hash(self): method columns (line 1081) | def columns(self, *names): method __sql__ (line 1084) | def __sql__(self, ctx): class CTE (line 1106) | class CTE(_HashableSource, Source): method __init__ (line 1107) | def __init__(self, name, query, recursive=False, columns=None, method select_from (line 1120) | def select_from(self, *columns): method _get_hash (line 1134) | def _get_hash(self): method union_all (line 1137) | def union_all(self, rhs): method union (line 1142) | def union(self, rhs): method __sql__ (line 1147) | def __sql__(self, ctx): class ColumnBase (line 1169) | class ColumnBase(Node): method converter (line 1173) | def converter(self, converter=None): method alias (line 1176) | def alias(self, alias): method unalias (line 1181) | def unalias(self): method bind_to (line 1184) | def bind_to(self, dest): method cast (line 1187) | def cast(self, as_type): method asc (line 1190) | def asc(self, collation=None, nulls=None): method desc (line 1194) | def desc(self, collation=None, nulls=None): method __invert__ (line 1198) | def __invert__(self): method _e (line 1201) | def _e(op, inv=False): method __eq__ (line 1227) | def __eq__(self, rhs): method __ne__ (line 1230) | def __ne__(self, rhs): method is_null (line 1254) | def is_null(self, is_null=True): method _escape_like_expr (line 1258) | def _escape_like_expr(self, s, template): method contains (line 1269) | def contains(self, rhs): method startswith (line 1276) | def startswith(self, rhs): method endswith (line 1282) | def endswith(self, rhs): method between (line 1288) | def between(self, lo, hi): method concat (line 1290) | def concat(self, rhs): method __getitem__ (line 1292) | def __getitem__(self, item): method distinct (line 1301) | def distinct(self): method collate (line 1304) | def collate(self, collation): method get_sort_key (line 1307) | def get_sort_key(self, ctx): class Column (line 1311) | class Column(ColumnBase): method __init__ (line 1312) | def __init__(self, source, name): method get_sort_key (line 1316) | def get_sort_key(self, ctx): method __hash__ (line 1322) | def __hash__(self): method __sql__ (line 1325) | def __sql__(self, ctx): class WrappedNode (line 1333) | class WrappedNode(ColumnBase): method __init__ (line 1334) | def __init__(self, node): method is_alias (line 1339) | def is_alias(self): method unwrap (line 1342) | def unwrap(self): class EntityFactory (line 1346) | class EntityFactory(object): method __init__ (line 1348) | def __init__(self, node): method __getattr__ (line 1350) | def __getattr__(self, attr): class _DynamicEntity (line 1354) | class _DynamicEntity(object): method __get__ (line 1356) | def __get__(self, instance, instance_type=None): class Alias (line 1362) | class Alias(WrappedNode): method __init__ (line 1365) | def __init__(self, node, alias): method __hash__ (line 1369) | def __hash__(self): method name (line 1373) | def name(self): method name (line 1376) | def name(self, value): method alias (line 1379) | def alias(self, alias=None): method unalias (line 1385) | def unalias(self): method is_alias (line 1388) | def is_alias(self): method __sql__ (line 1391) | def __sql__(self, ctx): class BindTo (line 1401) | class BindTo(WrappedNode): method __init__ (line 1402) | def __init__(self, node, dest): method __sql__ (line 1406) | def __sql__(self, ctx): class Negated (line 1410) | class Negated(WrappedNode): method __invert__ (line 1411) | def __invert__(self): method __sql__ (line 1414) | def __sql__(self, ctx): class BitwiseMixin (line 1418) | class BitwiseMixin(object): method __and__ (line 1419) | def __and__(self, other): method __or__ (line 1422) | def __or__(self, other): method __sub__ (line 1425) | def __sub__(self, other): method __invert__ (line 1428) | def __invert__(self): class BitwiseNegated (line 1432) | class BitwiseNegated(BitwiseMixin, WrappedNode): method __invert__ (line 1435) | def __invert__(self): method __sql__ (line 1438) | def __sql__(self, ctx): class Value (line 1446) | class Value(ColumnBase): method __init__ (line 1447) | def __init__(self, value, converter=None, unpack=True): method __sql__ (line 1461) | def __sql__(self, ctx): class ValueLiterals (line 1469) | class ValueLiterals(WrappedNode): method __sql__ (line 1470) | def __sql__(self, ctx): function AsIs (line 1475) | def AsIs(value, converter=None): class Cast (line 1479) | class Cast(WrappedNode): method __init__ (line 1480) | def __init__(self, node, cast): method __sql__ (line 1485) | def __sql__(self, ctx): class Ordering (line 1492) | class Ordering(WrappedNode): method __init__ (line 1493) | def __init__(self, node, direction, collation=None, nulls=None): method collate (line 1502) | def collate(self, collation=None): method _null_ordering_case (line 1505) | def _null_ordering_case(self, nulls): method __sql__ (line 1514) | def __sql__(self, ctx): function Asc (line 1526) | def Asc(node, collation=None, nulls=None): function Desc (line 1530) | def Desc(node, collation=None, nulls=None): class Expression (line 1534) | class Expression(ColumnBase): method __init__ (line 1535) | def __init__(self, lhs, op, rhs, flat=False): method __sql__ (line 1541) | def __sql__(self, ctx): method _is_rhs_empty (line 1579) | def _is_rhs_empty(self, rhs, ctx): class StringExpression (line 1588) | class StringExpression(Expression): method __add__ (line 1589) | def __add__(self, rhs): method __radd__ (line 1591) | def __radd__(self, lhs): class Entity (line 1595) | class Entity(ColumnBase): method __init__ (line 1596) | def __init__(self, *path): method __getattr__ (line 1599) | def __getattr__(self, attr): method get_sort_key (line 1602) | def get_sort_key(self, ctx): method __hash__ (line 1605) | def __hash__(self): method __sql__ (line 1608) | def __sql__(self, ctx): class SQL (line 1615) | class SQL(ColumnBase): method __init__ (line 1616) | def __init__(self, sql, params=None): method __sql__ (line 1620) | def __sql__(self, ctx): function Check (line 1628) | def Check(constraint, name=None): function Default (line 1635) | def Default(value): class Function (line 1639) | class Function(ColumnBase): method __init__ (line 1642) | def __init__(self, name, arguments, coerce=True, python_value=None): method __getattr__ (line 1653) | def __getattr__(self, attr): method filter (line 1659) | def filter(self, where=None): method order_by (line 1663) | def order_by(self, *ordering): method python_value (line 1667) | def python_value(self, func=None): method over (line 1670) | def over(self, partition_by=None, order_by=None, start=None, end=None, method __sql__ (line 1683) | def __sql__(self, ctx): class Window (line 1712) | class Window(Node): method __init__ (line 1724) | def __init__(self, partition_by=None, order_by=None, start=None, end=N... method alias (line 1745) | def alias(self, alias=None): method as_range (line 1750) | def as_range(self): method as_rows (line 1754) | def as_rows(self): method as_groups (line 1758) | def as_groups(self): method extends (line 1762) | def extends(self, window=None): method exclude (line 1766) | def exclude(self, frame_exclusion=None): method following (line 1772) | def following(value=None): method preceding (line 1778) | def preceding(value=None): method __sql__ (line 1783) | def __sql__(self, ctx): class WindowAlias (line 1822) | class WindowAlias(Node): method __init__ (line 1823) | def __init__(self, window): method alias (line 1826) | def alias(self, window_alias): method __sql__ (line 1830) | def __sql__(self, ctx): class _InFunction (line 1834) | class _InFunction(Node): method __init__ (line 1835) | def __init__(self, node, in_function=True): method __sql__ (line 1839) | def __sql__(self, ctx): class Case (line 1844) | class Case(ColumnBase): method __init__ (line 1845) | def __init__(self, predicate, expression_tuples, default=None): method __sql__ (line 1850) | def __sql__(self, ctx): class ForUpdate (line 1864) | class ForUpdate(Node): method __init__ (line 1865) | def __init__(self, expr, of=None, nowait=None, skip_locked=None): method __sql__ (line 1885) | def __sql__(self, ctx): class NodeList (line 1896) | class NodeList(ColumnBase): method __init__ (line 1897) | def __init__(self, nodes, glue=' ', parens=False): method __sql__ (line 1902) | def __sql__(self, ctx): function CommaNodeList (line 1923) | def CommaNodeList(nodes): function EnclosedNodeList (line 1927) | def EnclosedNodeList(nodes): class _Namespace (line 1931) | class _Namespace(Node): method __init__ (line 1933) | def __init__(self, name): method __getattr__ (line 1935) | def __getattr__(self, attr): class NamespaceAttribute (line 1939) | class NamespaceAttribute(ColumnBase): method __init__ (line 1940) | def __init__(self, namespace, attribute): method __sql__ (line 1944) | def __sql__(self, ctx): class DQ (line 1952) | class DQ(ColumnBase): method __init__ (line 1953) | def __init__(self, **query): method __invert__ (line 1959) | def __invert__(self): method clone (line 1962) | def clone(self): class QualifiedNames (line 1971) | class QualifiedNames(WrappedNode): method __sql__ (line 1972) | def __sql__(self, ctx): function qualify_names (line 1977) | def qualify_names(node): class OnConflict (line 1988) | class OnConflict(Node): method __init__ (line 1989) | def __init__(self, action=None, update=None, preserve=None, where=None, method get_conflict_statement (line 2003) | def get_conflict_statement(self, ctx, query): method get_conflict_update (line 2006) | def get_conflict_update(self, ctx, query): method preserve (line 2010) | def preserve(self, *columns): method update (line 2014) | def update(self, _data=None, **kwargs): method where (line 2024) | def where(self, *expressions): method conflict_target (line 2030) | def conflict_target(self, *constraints): method conflict_where (line 2035) | def conflict_where(self, *expressions): method conflict_constraint (line 2041) | def conflict_constraint(self, constraint): function database_required (line 2046) | def database_required(method): class BaseQuery (line 2058) | class BaseQuery(Node): method __init__ (line 2061) | def __init__(self, _database=None, **kwargs): method bind (line 2068) | def bind(self, database=None): method clone (line 2072) | def clone(self): method dicts (line 2078) | def dicts(self, as_dict=True): method tuples (line 2083) | def tuples(self, as_tuple=True): method namedtuples (line 2088) | def namedtuples(self, as_namedtuple=True): method objects (line 2093) | def objects(self, constructor=None): method _get_cursor_wrapper (line 2098) | def _get_cursor_wrapper(self, cursor): method __sql__ (line 2112) | def __sql__(self, ctx): method sql (line 2115) | def sql(self): method execute (line 2123) | def execute(self, database): method _execute (line 2126) | def _execute(self, database): method iterator (line 2129) | def iterator(self, database=None): method _ensure_execution (line 2132) | def _ensure_execution(self): method __iter__ (line 2138) | def __iter__(self): method __getitem__ (line 2142) | def __getitem__(self, value): method __len__ (line 2153) | def __len__(self): method __str__ (line 2157) | def __str__(self): class RawQuery (line 2161) | class RawQuery(BaseQuery): method __init__ (line 2162) | def __init__(self, sql=None, params=None, **kwargs): method __sql__ (line 2167) | def __sql__(self, ctx): method _execute (line 2174) | def _execute(self, database): class Query (line 2181) | class Query(BaseQuery): method __init__ (line 2182) | def __init__(self, where=None, order_by=None, limit=None, offset=None, method with_cte (line 2193) | def with_cte(self, *cte_list): method where (line 2197) | def where(self, *expressions): method orwhere (line 2203) | def orwhere(self, *expressions): method order_by (line 2209) | def order_by(self, *values): method order_by_extend (line 2213) | def order_by_extend(self, *values): method limit (line 2217) | def limit(self, value=None): method offset (line 2221) | def offset(self, value=None): method paginate (line 2225) | def paginate(self, page, paginate_by=20): method _apply_ordering (line 2230) | def _apply_ordering(self, ctx): method __sql__ (line 2243) | def __sql__(self, ctx): function __compound_select__ (line 2259) | def __compound_select__(operation, inverted=False): class SelectQuery (line 2268) | class SelectQuery(Query): method select_from (line 2278) | def select_from(self, *columns): class SelectBase (line 2290) | class SelectBase(_HashableSource, Source, SelectQuery): method _get_hash (line 2291) | def _get_hash(self): method _execute (line 2294) | def _execute(self, database): method peek (line 2301) | def peek(self, database, n=1): method first (line 2307) | def first(self, database, n=1): method scalar (line 2314) | def scalar(self, database, as_tuple=False, as_dict=False): method scalars (line 2321) | def scalars(self, database): method count (line 2326) | def count(self, database, clear_limit=False): method exists (line 2340) | def exists(self, database): method get (line 2347) | def get(self, database): class CompoundSelectQuery (line 2358) | class CompoundSelectQuery(SelectBase): method __init__ (line 2359) | def __init__(self, lhs, op, rhs): method _returning (line 2366) | def _returning(self): method exists (line 2370) | def exists(self, database): method _get_query_key (line 2374) | def _get_query_key(self): method _wrap_parens (line 2377) | def _wrap_parens(self, ctx, subq): method __sql__ (line 2395) | def __sql__(self, ctx): class Select (line 2425) | class Select(SelectBase): method __init__ (line 2426) | def __init__(self, from_list=None, columns=None, group_by=None, method clone (line 2448) | def clone(self): method columns (line 2455) | def columns(self, *columns, **kwargs): method select_extend (line 2460) | def select_extend(self, *columns): method selected_columns (line 2464) | def selected_columns(self): method selected_columns (line 2467) | def selected_columns(self, value): method from_ (line 2471) | def from_(self, *sources): method join (line 2475) | def join(self, dest, join_type=JOIN.INNER, on=None): method left_outer_join (line 2483) | def left_outer_join(self, dest, on=None): method group_by (line 2487) | def group_by(self, *columns): method group_by_extend (line 2501) | def group_by_extend(self, *values): method having (line 2507) | def having(self, *expressions): method distinct (line 2513) | def distinct(self, *columns): method window (line 2521) | def window(self, *windows): method for_update (line 2525) | def for_update(self, for_update=True, of=None, nowait=None, method lateral (line 2536) | def lateral(self, lateral=True): method _get_query_key (line 2539) | def _get_query_key(self): method __sql_selection__ (line 2542) | def __sql_selection__(self, ctx, is_subquery=False): method __sql__ (line 2545) | def __sql__(self, ctx): class _WriteQuery (line 2617) | class _WriteQuery(Query): method __init__ (line 2618) | def __init__(self, table, returning=None, **kwargs): method cte (line 2624) | def cte(self, name, recursive=False, columns=None, materialized=None): method returning (line 2629) | def returning(self, *returning): method apply_returning (line 2633) | def apply_returning(self, ctx): method _execute (line 2639) | def _execute(self, database): method execute_returning (line 2646) | def execute_returning(self, database): method handle_result (line 2652) | def handle_result(self, database, cursor): method _set_table_alias (line 2657) | def _set_table_alias(self, ctx): method __sql__ (line 2660) | def __sql__(self, ctx): class Update (line 2669) | class Update(_WriteQuery): method __init__ (line 2670) | def __init__(self, table, update=None, **kwargs): method from_ (line 2676) | def from_(self, *sources): method __sql__ (line 2679) | def __sql__(self, ctx): class Insert (line 2719) | class Insert(_WriteQuery): class DefaultValuesException (line 2723) | class DefaultValuesException(Exception): pass method __init__ (line 2725) | def __init__(self, table, insert=None, columns=None, on_conflict=None, method where (line 2734) | def where(self, *expressions): method as_rowcount (line 2738) | def as_rowcount(self, _as_rowcount=True): method on_conflict_ignore (line 2742) | def on_conflict_ignore(self, ignore=True): method on_conflict_replace (line 2746) | def on_conflict_replace(self, replace=True): method on_conflict (line 2750) | def on_conflict(self, *args, **kwargs): method _simple_insert (line 2754) | def _simple_insert(self, ctx): method get_default_data (line 2759) | def get_default_data(self): method get_default_columns (line 2762) | def get_default_columns(self): method _generate_insert (line 2767) | def _generate_insert(self, insert, ctx): method _query_insert (line 2881) | def _query_insert(self, ctx): method _default_values (line 2887) | def _default_values(self, ctx): method __sql__ (line 2892) | def __sql__(self, ctx): method _execute (line 2925) | def _execute(self, database): method handle_result (line 2934) | def handle_result(self, database, cursor): class Delete (line 2942) | class Delete(_WriteQuery): method __sql__ (line 2943) | def __sql__(self, ctx): class Index (line 2956) | class Index(Node): method __init__ (line 2957) | def __init__(self, name, table, expressions, unique=False, safe=False, method safe (line 2971) | def safe(self, _safe=True): method where (line 2975) | def where(self, *expressions): method using (line 2981) | def using(self, _using=None): method nulls_distinct (line 2985) | def nulls_distinct(self, nulls_distinct=None): method __sql__ (line 2990) | def __sql__(self, ctx): class ModelIndex (line 3034) | class ModelIndex(Index): method __init__ (line 3035) | def __init__(self, model, fields, unique=False, safe=True, where=None, method _generate_name_from_fields (line 3054) | def _generate_name_from_fields(self, model, fields): function _truncate_constraint_name (line 3075) | def _truncate_constraint_name(constraint, maxlen=64): class PeeweeException (line 3085) | class PeeweeException(Exception): method __init__ (line 3086) | def __init__(self, *args): class ImproperlyConfigured (line 3090) | class ImproperlyConfigured(PeeweeException): pass class DatabaseError (line 3091) | class DatabaseError(PeeweeException): pass class DataError (line 3092) | class DataError(DatabaseError): pass class IntegrityError (line 3093) | class IntegrityError(DatabaseError): pass class InterfaceError (line 3094) | class InterfaceError(PeeweeException): pass class InternalError (line 3095) | class InternalError(DatabaseError): pass class NotSupportedError (line 3096) | class NotSupportedError(DatabaseError): pass class OperationalError (line 3097) | class OperationalError(DatabaseError): pass class ProgrammingError (line 3098) | class ProgrammingError(DatabaseError): pass class ExceptionWrapper (line 3101) | class ExceptionWrapper(object): method __init__ (line 3103) | def __init__(self, exceptions): method __enter__ (line 3105) | def __enter__(self): pass method __exit__ (line 3106) | def __exit__(self, exc_type, exc_value, traceback): class _ConnectionState (line 3155) | class _ConnectionState(object): method __init__ (line 3156) | def __init__(self, **kwargs): method reset (line 3160) | def reset(self): method set_connection (line 3166) | def set_connection(self, conn): class _ConnectionLocal (line 3173) | class _ConnectionLocal(_ConnectionState, threading.local): pass class _NoopLock (line 3174) | class _NoopLock(object): method __enter__ (line 3176) | def __enter__(self): return self method __exit__ (line 3177) | def __exit__(self, exc_type, exc_val, exc_tb): pass class ConnectionContext (line 3180) | class ConnectionContext(object): method __init__ (line 3182) | def __init__(self, db): self.db = db method __enter__ (line 3183) | def __enter__(self): method __exit__ (line 3186) | def __exit__(self, exc_type, exc_val, exc_tb): self.db.close() method __call__ (line 3187) | def __call__(self, fn): class Database (line 3195) | class Database(_callable_context_manager): method __init__ (line 3216) | def __init__(self, database, thread_safe=True, autorollback=False, method init (line 3254) | def init(self, database, **kwargs): method __enter__ (line 3261) | def __enter__(self): method __exit__ (line 3269) | def __exit__(self, exc_type, exc_val, exc_tb): method connection_context (line 3277) | def connection_context(self): method _connect (line 3280) | def _connect(self): method connect (line 3283) | def connect(self, reuse_if_open=False): method _initialize_connection (line 3301) | def _initialize_connection(self, conn): method _set_server_version (line 3304) | def _set_server_version(self, conn): method close (line 3307) | def close(self): method _close (line 3324) | def _close(self, conn): method is_closed (line 3327) | def is_closed(self): method is_connection_usable (line 3330) | def is_connection_usable(self): method connection (line 3333) | def connection(self): method cursor (line 3338) | def cursor(self, named_cursor=None): method execute_sql (line 3346) | def execute_sql(self, sql, params=None): method execute (line 3354) | def execute(self, query, **context_options): method get_context_options (line 3359) | def get_context_options(self): method get_sql_context (line 3375) | def get_sql_context(self, **context_options): method conflict_statement (line 3381) | def conflict_statement(self, on_conflict, query): method conflict_update (line 3384) | def conflict_update(self, on_conflict, query): method _build_on_conflict_update (line 3387) | def _build_on_conflict_update(self, on_conflict, query): method last_insert_id (line 3432) | def last_insert_id(self, cursor, query_type=None): method rows_affected (line 3435) | def rows_affected(self, cursor): method default_values_insert (line 3438) | def default_values_insert(self, ctx): method session_start (line 3441) | def session_start(self): method session_commit (line 3444) | def session_commit(self): method session_rollback (line 3452) | def session_rollback(self): method in_transaction (line 3460) | def in_transaction(self): method push_transaction (line 3463) | def push_transaction(self, transaction): method pop_transaction (line 3466) | def pop_transaction(self): method transaction_depth (line 3469) | def transaction_depth(self): method top_transaction (line 3472) | def top_transaction(self): method atomic (line 3476) | def atomic(self, *args, **kwargs): method manual_commit (line 3479) | def manual_commit(self): method transaction (line 3482) | def transaction(self, *args, **kwargs): method savepoint (line 3485) | def savepoint(self): method begin (line 3488) | def begin(self): method rollback (line 3494) | def rollback(self): method commit (line 3498) | def commit(self): method batch_commit (line 3502) | def batch_commit(self, it, n): method table_exists (line 3508) | def table_exists(self, table_name, schema=None): method get_tables (line 3515) | def get_tables(self, schema=None): method get_indexes (line 3518) | def get_indexes(self, table, schema=None): method get_columns (line 3521) | def get_columns(self, table, schema=None): method get_primary_keys (line 3524) | def get_primary_keys(self, table, schema=None): method get_foreign_keys (line 3527) | def get_foreign_keys(self, table, schema=None): method sequence_exists (line 3530) | def sequence_exists(self, seq): method create_tables (line 3533) | def create_tables(self, models, **options): method drop_tables (line 3537) | def drop_tables(self, models, **kwargs): method extract_date (line 3541) | def extract_date(self, date_part, date_field): method truncate_date (line 3544) | def truncate_date(self, date_part, date_field): method to_timestamp (line 3547) | def to_timestamp(self, date_field): method from_timestamp (line 3550) | def from_timestamp(self, date_field): method random (line 3553) | def random(self): method bind (line 3556) | def bind(self, models, bind_refs=True, bind_backrefs=True): method bind_ctx (line 3560) | def bind_ctx(self, models, bind_refs=True, bind_backrefs=True): method get_noop_select (line 3563) | def get_noop_select(self, ctx): method Model (line 3567) | def Model(self): function __pragma__ (line 3574) | def __pragma__(name): class SqliteDatabase (line 3582) | class SqliteDatabase(Database): method __init__ (line 3598) | def __init__(self, database, pragmas=None, regexp_function=False, method init (line 3622) | def init(self, database, pragmas=None, timeout=5, returning_clause=None, method _set_server_version (line 3635) | def _set_server_version(self, conn): method _connect (line 3638) | def _connect(self): method _add_conn_hooks (line 3650) | def _add_conn_hooks(self, conn): method _set_pragmas (line 3663) | def _set_pragmas(self, conn): method _attach_databases (line 3669) | def _attach_databases(self, conn): method pragma (line 3675) | def pragma(self, key, value=SENTINEL, permanent=False, schema=None): method timeout (line 3705) | def timeout(self): method timeout (line 3709) | def timeout(self, seconds): method _load_aggregates (line 3719) | def _load_aggregates(self, conn): method _load_collations (line 3723) | def _load_collations(self, conn): method _load_functions (line 3727) | def _load_functions(self, conn): method _load_window_functions (line 3732) | def _load_window_functions(self, conn): method register_aggregate (line 3736) | def register_aggregate(self, klass, name=None, num_params=-1): method aggregate (line 3741) | def aggregate(self, name=None, num_params=-1): method register_collation (line 3747) | def register_collation(self, fn, name=None): method collation (line 3757) | def collation(self, name=None): method register_function (line 3763) | def register_function(self, fn, name=None, num_params=-1, method func (line 3769) | def func(self, name=None, num_params=-1, deterministic=None): method register_window_function (line 3775) | def register_window_function(self, klass, name=None, num_params=-1): method window_function (line 3781) | def window_function(self, name=None, num_params=-1): method unregister_aggregate (line 3787) | def unregister_aggregate(self, name): method unregister_collation (line 3790) | def unregister_collation(self, name): method unregister_function (line 3793) | def unregister_function(self, name): method unregister_window_function (line 3796) | def unregister_window_function(self, name): method _load_extensions (line 3799) | def _load_extensions(self, conn): method load_extension (line 3804) | def load_extension(self, extension): method unload_extension (line 3811) | def unload_extension(self, extension): method attach (line 3814) | def attach(self, filename, name): method detach (line 3825) | def detach(self, name): method last_insert_id (line 3834) | def last_insert_id(self, cursor, query_type=None): method rows_affected (line 3844) | def rows_affected(self, cursor): method begin (line 3850) | def begin(self, lock_type=None): method commit (line 3854) | def commit(self): method rollback (line 3858) | def rollback(self): method get_tables (line 3862) | def get_tables(self, schema=None): method get_views (line 3868) | def get_views(self, schema=None): method get_indexes (line 3873) | def get_indexes(self, table, schema=None): method get_columns (line 3906) | def get_columns(self, table, schema=None): method get_primary_keys (line 3912) | def get_primary_keys(self, table, schema=None): method get_foreign_keys (line 3917) | def get_foreign_keys(self, table, schema=None): method get_binary_type (line 3923) | def get_binary_type(self): method conflict_statement (line 3926) | def conflict_statement(self, on_conflict, query): method conflict_update (line 3931) | def conflict_update(self, oc, query): method extract_date (line 3959) | def extract_date(self, date_part, date_field): method truncate_date (line 3962) | def truncate_date(self, date_part, date_field): method to_timestamp (line 3966) | def to_timestamp(self, date_field): method from_timestamp (line 3969) | def from_timestamp(self, date_field): class _BasePsycopgAdapter (line 3973) | class _BasePsycopgAdapter(object): method __init__ (line 3976) | def __init__(self): method isolation_level_int (line 3980) | def isolation_level_int(self, isolation_level): method isolation_level_str (line 3985) | def isolation_level_str(self, isolation_level): class Psycopg2Adapter (line 3991) | class Psycopg2Adapter(_BasePsycopgAdapter): method __init__ (line 3999) | def __init__(self): method check_driver (line 4005) | def check_driver(self): method get_binary_type (line 4009) | def get_binary_type(self): method connect (line 4012) | def connect(self, db, **params): method get_server_version (line 4026) | def get_server_version(self, conn): method is_connection_usable (line 4029) | def is_connection_usable(self, conn): method is_connection_reusable (line 4033) | def is_connection_reusable(self, conn): method is_connection_closed (line 4046) | def is_connection_closed(self, conn): class Psycopg3Adapter (line 4055) | class Psycopg3Adapter(_BasePsycopgAdapter): method __init__ (line 4063) | def __init__(self): method check_driver (line 4069) | def check_driver(self): method get_binary_type (line 4073) | def get_binary_type(self): method connect (line 4076) | def connect(self, db, **params): method get_server_version (line 4083) | def get_server_version(self, conn): method is_connection_usable (line 4086) | def is_connection_usable(self, conn): method is_connection_reusable (line 4089) | def is_connection_reusable(self, conn): method is_connection_closed (line 4102) | def is_connection_closed(self, conn): class PostgresqlDatabase (line 4111) | class PostgresqlDatabase(Database): method init (line 4134) | def init(self, database, register_unicode=True, encoding=None, method _connect (line 4152) | def _connect(self): method _set_server_version (line 4165) | def _set_server_version(self, conn): method is_connection_usable (line 4168) | def is_connection_usable(self): method last_insert_id (line 4177) | def last_insert_id(self, cursor, query_type=None): method rows_affected (line 4183) | def rows_affected(self, cursor): method begin (line 4189) | def begin(self, isolation_level=None): method get_tables (line 4200) | def get_tables(self, schema=None): method get_views (line 4206) | def get_views(self, schema=None): method get_indexes (line 4213) | def get_indexes(self, table, schema=None): method get_columns (line 4233) | def get_columns(self, table, schema=None): method get_primary_keys (line 4244) | def get_primary_keys(self, table, schema=None): method get_foreign_keys (line 4260) | def get_foreign_keys(self, table, schema=None): method sequence_exists (line 4281) | def sequence_exists(self, sequence): method get_binary_type (line 4289) | def get_binary_type(self): method conflict_statement (line 4292) | def conflict_statement(self, on_conflict, query): method conflict_update (line 4295) | def conflict_update(self, oc, query): method extract_date (line 4320) | def extract_date(self, date_part, date_field): method truncate_date (line 4323) | def truncate_date(self, date_part, date_field): method interval (line 4326) | def interval(self, val): method to_timestamp (line 4329) | def to_timestamp(self, date_field): method from_timestamp (line 4332) | def from_timestamp(self, date_field): method get_noop_select (line 4336) | def get_noop_select(self, ctx): method set_time_zone (line 4339) | def set_time_zone(self, timezone): method set_isolation_level (line 4342) | def set_isolation_level(self, isolation_level): class MySQLDatabase (line 4347) | class MySQLDatabase(Database): method init (line 4374) | def init(self, database, **kwargs): method _connect (line 4384) | def _connect(self): method _set_server_version (line 4391) | def _set_server_version(self, conn): method _extract_server_version (line 4398) | def _extract_server_version(self, version): method is_connection_usable (line 4412) | def is_connection_usable(self): method default_values_insert (line 4428) | def default_values_insert(self, ctx): method begin (line 4431) | def begin(self, isolation_level=None): method get_tables (line 4441) | def get_tables(self, schema=None): method get_views (line 4447) | def get_views(self, schema=None): method get_indexes (line 4454) | def get_indexes(self, table, schema=None): method get_columns (line 4466) | def get_columns(self, table, schema=None): method get_primary_keys (line 4477) | def get_primary_keys(self, table, schema=None): method get_foreign_keys (line 4482) | def get_foreign_keys(self, table, schema=None): method get_binary_type (line 4495) | def get_binary_type(self): method conflict_statement (line 4498) | def conflict_statement(self, on_conflict, query): method conflict_update (line 4510) | def conflict_update(self, on_conflict, query): method extract_date (line 4553) | def extract_date(self, date_part, date_field): method truncate_date (line 4556) | def truncate_date(self, date_part, date_field): method to_timestamp (line 4560) | def to_timestamp(self, date_field): method from_timestamp (line 4563) | def from_timestamp(self, date_field): method random (line 4566) | def random(self): method get_noop_select (line 4569) | def get_noop_select(self, ctx): class _manual (line 4576) | class _manual(object): method __init__ (line 4577) | def __init__(self, db): method __call__ (line 4580) | def __call__(self, fn): method __enter__ (line 4587) | def __enter__(self): method __exit__ (line 4594) | def __exit__(self, exc_type, exc_val, exc_tb): class _atomic (line 4600) | class _atomic(object): method __init__ (line 4601) | def __init__(self, db, *args, **kwargs): method __call__ (line 4605) | def __call__(self, fn): method __enter__ (line 4613) | def __enter__(self): method __exit__ (line 4624) | def __exit__(self, exc_type, exc_val, exc_tb): class _transaction (line 4628) | class _transaction(object): method __init__ (line 4629) | def __init__(self, db, *args, **kwargs): method __call__ (line 4633) | def __call__(self, fn): method _begin (line 4641) | def _begin(self): method commit (line 4645) | def commit(self, begin=True): method rollback (line 4650) | def rollback(self, begin=True): method __enter__ (line 4655) | def __enter__(self): method __exit__ (line 4661) | def __exit__(self, exc_type, exc_val, exc_tb): class _savepoint (line 4674) | class _savepoint(object): method __init__ (line 4675) | def __init__(self, db, sid=None): method __call__ (line 4680) | def __call__(self, fn): method _begin (line 4687) | def _begin(self): method commit (line 4690) | def commit(self, begin=True): method rollback (line 4694) | def rollback(self, begin=True): method __enter__ (line 4698) | def __enter__(self): method __exit__ (line 4702) | def __exit__(self, exc_type, exc_val, exc_tb): class CursorWrapper (line 4716) | class CursorWrapper(object): method __init__ (line 4717) | def __init__(self, cursor): method __iter__ (line 4725) | def __iter__(self): method __getitem__ (line 4730) | def __getitem__(self, item): method __len__ (line 4745) | def __len__(self): method initialize (line 4749) | def initialize(self): method iterate (line 4752) | def iterate(self, cache=True): method process_row (line 4767) | def process_row(self, row): method iterator (line 4770) | def iterator(self): method fill_cache (line 4778) | def fill_cache(self, n=0): method dedupe_columns (line 4794) | def dedupe_columns(self, columns, valid_identifiers=True): class DictCursorWrapper (line 4814) | class DictCursorWrapper(CursorWrapper): method initialize (line 4815) | def initialize(self): method _row_to_dict (line 4821) | def _row_to_dict(self, row): class NamedTupleCursorWrapper (line 4829) | class NamedTupleCursorWrapper(CursorWrapper): method initialize (line 4830) | def initialize(self): method process_row (line 4835) | def process_row(self, row): class ObjectCursorWrapper (line 4839) | class ObjectCursorWrapper(DictCursorWrapper): method __init__ (line 4840) | def __init__(self, cursor, constructor): method initialize (line 4844) | def initialize(self): method process_row (line 4850) | def process_row(self, row): class ResultIterator (line 4855) | class ResultIterator(object): method __init__ (line 4856) | def __init__(self, cursor_wrapper): method __iter__ (line 4860) | def __iter__(self): method next (line 4863) | def next(self): class FieldAccessor (line 4878) | class FieldAccessor(object): method __init__ (line 4879) | def __init__(self, model, field, name): method __get__ (line 4884) | def __get__(self, instance, instance_type=None): method __set__ (line 4892) | def __set__(self, instance, value): class ForeignKeyAccessor (line 4897) | class ForeignKeyAccessor(FieldAccessor): method __init__ (line 4898) | def __init__(self, model, field, name): method get_rel_instance (line 4902) | def get_rel_instance(self, instance): method __get__ (line 4913) | def __get__(self, instance, instance_type=None): method __set__ (line 4918) | def __set__(self, instance, obj): class BackrefAccessor (line 4931) | class BackrefAccessor(object): method __init__ (line 4932) | def __init__(self, field): method __get__ (line 4937) | def __get__(self, instance, instance_type=None): class ObjectIdAccessor (line 4946) | class ObjectIdAccessor(object): method __init__ (line 4948) | def __init__(self, field): method __get__ (line 4951) | def __get__(self, instance, instance_type=None): method __set__ (line 4961) | def __set__(self, instance, value): class Field (line 4965) | class Field(ColumnBase): method __init__ (line 4974) | def __init__(self, null=False, index=False, unique=False, column_name=... method __hash__ (line 5006) | def __hash__(self): method __repr__ (line 5009) | def __repr__(self): method bind (line 5016) | def bind(self, model, name, set_attribute=True): method column (line 5024) | def column(self): method adapt (line 5027) | def adapt(self, value): method db_value (line 5030) | def db_value(self, value): method python_value (line 5033) | def python_value(self, value): method to_value (line 5036) | def to_value(self, value, case=False): method get_sort_key (line 5039) | def get_sort_key(self, ctx): method __sql__ (line 5042) | def __sql__(self, ctx): method get_modifiers (line 5045) | def get_modifiers(self): method ddl_datatype (line 5048) | def ddl_datatype(self, ctx): method ddl (line 5062) | def ddl(self, ctx): class AnyField (line 5082) | class AnyField(Field): class IntegerField (line 5086) | class IntegerField(Field): method adapt (line 5089) | def adapt(self, value): class BigIntegerField (line 5096) | class BigIntegerField(IntegerField): class SmallIntegerField (line 5100) | class SmallIntegerField(IntegerField): class AutoField (line 5104) | class AutoField(IntegerField): method __init__ (line 5108) | def __init__(self, *args, **kwargs): class BigAutoField (line 5115) | class BigAutoField(AutoField): class IdentityField (line 5119) | class IdentityField(AutoField): method __init__ (line 5122) | def __init__(self, generate_always=False, **kwargs): class PrimaryKeyField (line 5128) | class PrimaryKeyField(AutoField): method __init__ (line 5129) | def __init__(self, *args, **kwargs): class FloatField (line 5136) | class FloatField(Field): method adapt (line 5139) | def adapt(self, value): class DoubleField (line 5146) | class DoubleField(FloatField): class DecimalField (line 5150) | class DecimalField(Field): method __init__ (line 5153) | def __init__(self, max_digits=10, decimal_places=5, auto_round=False, method get_modifiers (line 5162) | def get_modifiers(self): method db_value (line 5165) | def db_value(self, value): method python_value (line 5174) | def python_value(self, value): class _StringField (line 5181) | class _StringField(Field): method adapt (line 5182) | def adapt(self, value): method __add__ (line 5189) | def __add__(self, other): return StringExpression(self, OP.CONCAT, other) method __radd__ (line 5190) | def __radd__(self, other): return StringExpression(other, OP.CONCAT, s... class CharField (line 5193) | class CharField(_StringField): method __init__ (line 5196) | def __init__(self, max_length=255, *args, **kwargs): method get_modifiers (line 5200) | def get_modifiers(self): class FixedCharField (line 5204) | class FixedCharField(CharField): method adapt (line 5207) | def adapt(self, value): class TextField (line 5214) | class TextField(_StringField): class FieldDatabaseHook (line 5218) | class FieldDatabaseHook(object): method _db_hook (line 5219) | def _db_hook(self, database): method bind (line 5222) | def bind(self, model, name, set_attribute=True): class BlobField (line 5239) | class BlobField(FieldDatabaseHook, Field): method _db_hook (line 5242) | def _db_hook(self, database): method db_value (line 5248) | def db_value(self, value): class BitField (line 5256) | class BitField(BitwiseMixin, BigIntegerField): method __init__ (line 5257) | def __init__(self, *args, **kwargs): method flag (line 5262) | def flag(self, value=None): class BigBitFieldData (line 5297) | class BigBitFieldData(object): method __init__ (line 5298) | def __init__(self, instance, name): method clear (line 5308) | def clear(self): method _ensure_length (line 5311) | def _ensure_length(self, idx): method set_bit (line 5318) | def set_bit(self, idx): method clear_bit (line 5322) | def clear_bit(self, idx): method toggle_bit (line 5326) | def toggle_bit(self, idx): method is_set (line 5331) | def is_set(self, idx): method __setitem__ (line 5339) | def __setitem__(self, item, value): method __len__ (line 5343) | def __len__(self): method _get_compatible_data (line 5346) | def _get_compatible_data(self, other): method _bitwise_op (line 5357) | def _bitwise_op(self, other, op): method __and__ (line 5370) | def __and__(self, other): method __or__ (line 5372) | def __or__(self, other): method __xor__ (line 5374) | def __xor__(self, other): method __iter__ (line 5377) | def __iter__(self): method __repr__ (line 5382) | def __repr__(self): method __bytes__ (line 5385) | def __bytes__(self): class BigBitFieldAccessor (line 5389) | class BigBitFieldAccessor(FieldAccessor): method __get__ (line 5390) | def __get__(self, instance, instance_type=None): method __set__ (line 5394) | def __set__(self, instance, value): class BigBitField (line 5409) | class BigBitField(BlobField): method __init__ (line 5412) | def __init__(self, *args, **kwargs): method db_value (line 5416) | def db_value(self, value): class UUIDField (line 5420) | class UUIDField(Field): method db_value (line 5423) | def db_value(self, value): method python_value (line 5437) | def python_value(self, value): class BinaryUUIDField (line 5443) | class BinaryUUIDField(BlobField): method db_value (line 5446) | def db_value(self, value): method python_value (line 5459) | def python_value(self, value): function _date_part (line 5469) | def _date_part(date_part): function format_date_time (line 5474) | def format_date_time(value, formats, post_process=None): function simple_date_time (line 5483) | def simple_date_time(value): class _BaseFormattedField (line 5490) | class _BaseFormattedField(Field): method __init__ (line 5493) | def __init__(self, formats=None, *args, **kwargs): class DateTimeField (line 5499) | class DateTimeField(_BaseFormattedField): method adapt (line 5509) | def adapt(self, value): method to_timestamp (line 5514) | def to_timestamp(self): method truncate (line 5517) | def truncate(self, part): class DateField (line 5528) | class DateField(_BaseFormattedField): method adapt (line 5536) | def adapt(self, value): method to_timestamp (line 5544) | def to_timestamp(self): method truncate (line 5547) | def truncate(self, part): class TimeField (line 5555) | class TimeField(_BaseFormattedField): method adapt (line 5565) | def adapt(self, value): function _timestamp_date_part (line 5581) | def _timestamp_date_part(date_part): class TimestampField (line 5590) | class TimestampField(BigIntegerField): method __init__ (line 5594) | def __init__(self, *args, **kwargs): method local_to_utc (line 5611) | def local_to_utc(self, dt): method utc_to_local (line 5618) | def utc_to_local(self, dt): method get_timestamp (line 5626) | def get_timestamp(self, value): method db_value (line 5633) | def db_value(self, value): method python_value (line 5650) | def python_value(self, value): method from_timestamp (line 5668) | def from_timestamp(self): class IPField (line 5681) | class IPField(BigIntegerField): method db_value (line 5682) | def db_value(self, val): method python_value (line 5686) | def python_value(self, val): class BooleanField (line 5691) | class BooleanField(Field): class BareField (line 5696) | class BareField(Field): method __init__ (line 5697) | def __init__(self, adapt=None, *args, **kwargs): method ddl_datatype (line 5702) | def ddl_datatype(self, ctx): class ForeignKeyField (line 5706) | class ForeignKeyField(Field): method __init__ (line 5710) | def __init__(self, model, field=None, backref=None, on_delete=None, method field_type (line 5746) | def field_type(self): method get_modifiers (line 5753) | def get_modifiers(self): method get_constraint_name (line 5758) | def get_constraint_name(self): method adapt (line 5764) | def adapt(self, value): method db_value (line 5767) | def db_value(self, value): method python_value (line 5772) | def python_value(self, value): method bind (line 5777) | def bind(self, model, name, set_attribute=True): method foreign_key_constraint (line 5813) | def foreign_key_constraint(self, explicit_name=False): method __getattr__ (line 5835) | def __getattr__(self, attr): class DeferredForeignKey (line 5845) | class DeferredForeignKey(Field): method __init__ (line 5848) | def __init__(self, rel_model_name, **kwargs): method __deepcopy__ (line 5859) | def __deepcopy__(self, memo=None): method set_model (line 5862) | def set_model(self, rel_model): method resolve (line 5871) | def resolve(model_cls): class DeferredThroughModel (line 5880) | class DeferredThroughModel(object): method __init__ (line 5881) | def __init__(self): method set_field (line 5884) | def set_field(self, model, field, name): method set_model (line 5887) | def set_model(self, through_model): class MetaField (line 5893) | class MetaField(Field): class ManyToManyFieldAccessor (line 5898) | class ManyToManyFieldAccessor(FieldAccessor): method __init__ (line 5899) | def __init__(self, model, field, name): method __get__ (line 5915) | def __get__(self, instance, instance_type=None, force_query=False): method __set__ (line 5933) | def __set__(self, instance, value): class ManyToManyField (line 5942) | class ManyToManyField(MetaField): method __init__ (line 5945) | def __init__(self, model, backref=None, through_model=None, on_delete=... method _get_descriptor (line 5963) | def _get_descriptor(self): method bind (line 5966) | def bind(self, model, name, set_attribute=True): method get_models (line 5984) | def get_models(self): method through_model (line 5990) | def through_model(self): method through_model (line 5996) | def through_model(self, value): method _create_through_model (line 5999) | def _create_through_model(self): method get_through_model (line 6020) | def get_through_model(self): class VirtualField (line 6025) | class VirtualField(MetaField): method __init__ (line 6028) | def __init__(self, field_class=None, *args, **kwargs): method db_value (line 6033) | def db_value(self, value): method python_value (line 6038) | def python_value(self, value): method bind (line 6043) | def bind(self, model, name, set_attribute=True): class CompositeKey (line 6049) | class CompositeKey(MetaField): method __init__ (line 6052) | def __init__(self, *field_names): method safe_field_names (line 6057) | def safe_field_names(self): method __get__ (line 6066) | def __get__(self, instance, instance_type=None): method __set__ (line 6071) | def __set__(self, instance, value): method __eq__ (line 6081) | def __eq__(self, other): method __ne__ (line 6086) | def __ne__(self, other): method __hash__ (line 6089) | def __hash__(self): method __sql__ (line 6092) | def __sql__(self, ctx): method bind (line 6100) | def bind(self, model, name, set_attribute=True): class _SortedFieldList (line 6106) | class _SortedFieldList(object): method __init__ (line 6109) | def __init__(self): method __getitem__ (line 6113) | def __getitem__(self, i): method __iter__ (line 6116) | def __iter__(self): method __contains__ (line 6119) | def __contains__(self, item): method index (line 6125) | def index(self, field): method insert (line 6128) | def insert(self, item): method remove (line 6134) | def remove(self, item): class SchemaManager (line 6143) | class SchemaManager(object): method __init__ (line 6144) | def __init__(self, model, database=None, **context_options): method database (line 6151) | def database(self): method database (line 6159) | def database(self, value): method _create_context (line 6162) | def _create_context(self): method _create_table (line 6165) | def _create_table(self, safe=True, **options): method _create_table_option_sql (line 6207) | def _create_table_option_sql(self, options): method create_table (line 6222) | def create_table(self, safe=True, **options): method _create_table_as (line 6225) | def _create_table_as(self, table_name, query, safe=True, **meta): method create_table_as (line 6236) | def create_table_as(self, table_name, query, safe=True, **meta): method _drop_table (line 6240) | def _drop_table(self, safe=True, **options): method drop_table (line 6250) | def drop_table(self, safe=True, **options): method _truncate_table (line 6253) | def _truncate_table(self, restart_identity=False, cascade=False): method truncate_table (line 6266) | def truncate_table(self, restart_identity=False, cascade=False): method _create_indexes (line 6269) | def _create_indexes(self, safe=True): method _create_index (line 6273) | def _create_index(self, index, safe=True): method create_indexes (line 6285) | def create_indexes(self, safe=True): method _drop_indexes (line 6289) | def _drop_indexes(self, safe=True): method _drop_index (line 6294) | def _drop_index(self, index, safe): method drop_indexes (line 6307) | def drop_indexes(self, safe=True): method _check_sequences (line 6311) | def _check_sequences(self, field): method _sequence_for_field (line 6316) | def _sequence_for_field(self, field): method _create_sequence (line 6322) | def _create_sequence(self, field): method create_sequence (line 6330) | def create_sequence(self, field): method _drop_sequence (line 6335) | def _drop_sequence(self, field): method drop_sequence (line 6343) | def drop_sequence(self, field): method _create_foreign_key (line 6348) | def _create_foreign_key(self, field): method create_foreign_key (line 6356) | def create_foreign_key(self, field): method create_sequences (line 6359) | def create_sequences(self): method create_all (line 6365) | def create_all(self, safe=True, **table_options): method drop_sequences (line 6370) | def drop_sequences(self): method drop_all (line 6376) | def drop_all(self, safe=True, drop_sequences=True, **options): class Metadata (line 6382) | class Metadata(object): method __init__ (line 6383) | def __init__(self, model, database=None, table_name=None, indexes=None, method make_table_name (line 6450) | def make_table_name(self): method model_graph (line 6455) | def model_graph(self, refs=True, backrefs=True, depth_first=True): method add_ref (line 6480) | def add_ref(self, field): method remove_ref (line 6487) | def remove_ref(self, field): method add_manytomany (line 6494) | def add_manytomany(self, field): method remove_manytomany (line 6497) | def remove_manytomany(self, field): method table (line 6501) | def table(self): method table (line 6512) | def table(self, value): method table (line 6516) | def table(self): method schema (line 6520) | def schema(self): method schema (line 6524) | def schema(self, value): method entity (line 6529) | def entity(self): method _update_sorted_fields (line 6535) | def _update_sorted_fields(self): method get_rel_for_model (line 6539) | def get_rel_for_model(self, model): method add_field (line 6546) | def add_field(self, field_name, field, set_attribute=True): method remove_field (line 6581) | def remove_field(self, field_name): method set_primary_key (line 6610) | def set_primary_key(self, name, field): method get_primary_keys (line 6618) | def get_primary_keys(self): method get_default_dict (line 6625) | def get_default_dict(self): method fields_to_index (line 6631) | def fields_to_index(self): method set_database (line 6658) | def set_database(self, database): method set_table_name (line 6671) | def set_table_name(self, table_name): class SubclassAwareMetadata (line 6676) | class SubclassAwareMetadata(Metadata): method __init__ (line 6679) | def __init__(self, model, *args, **kwargs): method map_models (line 6683) | def map_models(self, fn): class DoesNotExist (line 6688) | class DoesNotExist(Exception): pass class ModelBase (line 6691) | class ModelBase(type): method __new__ (line 6697) | def __new__(cls, name, bases, attrs, **kwargs): method __repr__ (line 6788) | def __repr__(self): method __iter__ (line 6791) | def __iter__(self): method __getitem__ (line 6794) | def __getitem__(self, key): method __setitem__ (line 6797) | def __setitem__(self, key, value): method __delitem__ (line 6800) | def __delitem__(self, key): method __contains__ (line 6803) | def __contains__(self, key): method __len__ (line 6811) | def __len__(self): method __bool__ (line 6813) | def __bool__(self): return True method __sql__ (line 6816) | def __sql__(self, ctx): class _BoundModelsContext (line 6820) | class _BoundModelsContext(object): method __init__ (line 6821) | def __init__(self, models, database, bind_refs, bind_backrefs): method __enter__ (line 6827) | def __enter__(self): method __exit__ (line 6835) | def __exit__(self, exc_type, exc_val, exc_tb): class Model (line 6841) | class Model(with_metaclass(ModelBase, Node)): method __init__ (line 6842) | def __init__(self, *args, **kwargs): method __str__ (line 6854) | def __str__(self): method validate_model (line 6858) | def validate_model(cls): method alias (line 6862) | def alias(cls, alias=None): method select (line 6866) | def select(cls, *fields): method _normalize_data (line 6873) | def _normalize_data(cls, data, kwargs): method update (line 6900) | def update(cls, __data=None, **update): method insert (line 6904) | def insert(cls, __data=None, **insert): method insert_many (line 6908) | def insert_many(cls, rows, fields=None): method insert_from (line 6912) | def insert_from(cls, query, fields): method replace (line 6918) | def replace(cls, __data=None, **insert): method replace_many (line 6922) | def replace_many(cls, rows, fields=None): method raw (line 6928) | def raw(cls, sql, *params): method delete (line 6932) | def delete(cls): method create (line 6936) | def create(cls, **query): method bulk_create (line 6942) | def bulk_create(cls, model_list, batch_size=None): method bulk_update (line 6977) | def bulk_update(cls, model_list, fields, batch_size=None): method noop (line 7016) | def noop(cls): method get (line 7020) | def get(cls, *query, **filters): method get_or_none (line 7034) | def get_or_none(cls, *query, **filters): method get_by_id (line 7041) | def get_by_id(cls, pk): method set_by_id (line 7045) | def set_by_id(cls, key, value): method delete_by_id (line 7053) | def delete_by_id(cls, pk): method get_or_create (line 7057) | def get_or_create(cls, **kwargs): method filter (line 7078) | def filter(cls, *dq_nodes, **filters): method get_id (line 7081) | def get_id(self): method _pk (line 7092) | def _pk(self, value): method _pk_expr (line 7095) | def _pk_expr(self): method _prune_fields (line 7098) | def _prune_fields(self, field_dict, only): method _populate_unsaved_relations (line 7107) | def _populate_unsaved_relations(self, field_dict): method save (line 7118) | def save(self, force_insert=False, only=None): method is_dirty (line 7161) | def is_dirty(self): method dirty_fields (line 7165) | def dirty_fields(self): method dirty_field_names (line 7169) | def dirty_field_names(self): method dependencies (line 7173) | def dependencies(self, search_nullable=True, exclude_null_children=Fal... method delete_instance (line 7204) | def delete_instance(self, recursive=False, delete_nullable=False): method __hash__ (line 7214) | def __hash__(self): method __eq__ (line 7217) | def __eq__(self, other): method __ne__ (line 7223) | def __ne__(self, other): method __sql__ (line 7226) | def __sql__(self, ctx): method bind (line 7247) | def bind(cls, database, bind_refs=True, bind_backrefs=True, _exclude=N... method bind_ctx (line 7261) | def bind_ctx(cls, database, bind_refs=True, bind_backrefs=True): method table_exists (line 7265) | def table_exists(cls): method create_table (line 7270) | def create_table(cls, safe=True, **options): method drop_table (line 7284) | def drop_table(cls, safe=True, drop_sequences=True, **options): method truncate_table (line 7293) | def truncate_table(cls, **options): method index (line 7297) | def index(cls, *fields, **kwargs): method add_index (line 7301) | def add_index(cls, *fields, **kwargs): class ModelAlias (line 7308) | class ModelAlias(Node): method __init__ (line 7310) | def __init__(self, model, alias=None): method __getattr__ (line 7314) | def __getattr__(self, attr): method __setattr__ (line 7333) | def __setattr__(self, attr, value): method get_field_aliases (line 7336) | def get_field_aliases(self): method select (line 7339) | def select(self, *selection): method __call__ (line 7344) | def __call__(self, **kwargs): method __sql__ (line 7347) | def __sql__(self, ctx): class FieldAlias (line 7366) | class FieldAlias(Field): method __init__ (line 7367) | def __init__(self, source, field): method create (line 7373) | def create(cls, source, field): method clone (line 7378) | def clone(self): method adapt (line 7381) | def adapt(self, value): return self.field.adapt(value) method python_value (line 7382) | def python_value(self, value): return self.field.python_value(value) method db_value (line 7383) | def db_value(self, value): return self.field.db_value(value) method __getattr__ (line 7384) | def __getattr__(self, attr): method __sql__ (line 7387) | def __sql__(self, ctx): function sort_models (line 7391) | def sort_models(models): class _ModelQueryHelper (line 7414) | class _ModelQueryHelper(object): method __init__ (line 7417) | def __init__(self, *args, **kwargs): method objects (line 7423) | def objects(self, constructor=None): method models (line 7428) | def models(self): method _get_cursor_wrapper (line 7431) | def _get_cursor_wrapper(self, cursor): method _get_model_cursor_wrapper (line 7448) | def _get_model_cursor_wrapper(self, cursor): class ModelRaw (line 7452) | class ModelRaw(_ModelQueryHelper, RawQuery): method __init__ (line 7453) | def __init__(self, model, sql, params, **kwargs): method get (line 7458) | def get(self): class BaseModelSelect (line 7468) | class BaseModelSelect(_ModelQueryHelper): method union_all (line 7469) | def union_all(self, rhs): method union (line 7473) | def union(self, rhs): method intersect (line 7477) | def intersect(self, rhs): method except_ (line 7481) | def except_(self, rhs): method __iter__ (line 7485) | def __iter__(self): method prefetch (line 7490) | def prefetch(self, *subqueries, **kwargs): method get (line 7493) | def get(self, database=None): method get_or_none (line 7504) | def get_or_none(self, database=None): method group_by (line 7511) | def group_by(self, *columns): class ModelCompoundSelectQuery (line 7528) | class ModelCompoundSelectQuery(BaseModelSelect, CompoundSelectQuery): method __init__ (line 7529) | def __init__(self, model, *args, **kwargs): method _get_model_cursor_wrapper (line 7533) | def _get_model_cursor_wrapper(self, cursor): function _normalize_model_select (line 7537) | def _normalize_model_select(fields_or_models): class ModelSelect (line 7551) | class ModelSelect(BaseModelSelect, Select): method __init__ (line 7552) | def __init__(self, model, fields_or_models, is_default=False): method clone (line 7559) | def clone(self): method select (line 7564) | def select(self, *fields_or_models): method select_extend (line 7571) | def select_extend(self, *columns): method switch (line 7576) | def switch(self, ctx=None): method _get_model (line 7580) | def _get_model(self, src): method _normalize_join (line 7591) | def _normalize_join(self, src, dest, on, attr): method _generate_on_clause (line 7658) | def _generate_on_clause(self, src, dest, to_field=None, on=None): method join (line 7724) | def join(self, dest, join_type=JOIN.INNER, on=None, src=None, attr=None): method left_outer_join (line 7743) | def left_outer_join(self, dest, on=None, src=None, attr=None): method join_from (line 7746) | def join_from(self, src, dest, join_type=JOIN.INNER, on=None, attr=None): method _get_model_cursor_wrapper (line 7749) | def _get_model_cursor_wrapper(self, cursor): method ensure_join (line 7756) | def ensure_join(self, lm, rm, on=None, **join_kwargs): method convert_dict_to_node (line 7763) | def convert_dict_to_node(self, qdict): method filter (line 7798) | def filter(self, *args, **kwargs): method create_table (line 7849) | def create_table(self, name, safe=True, **meta): method __sql_selection__ (line 7852) | def __sql_selection__(self, ctx, is_subquery=False): class NoopModelSelect (line 7860) | class NoopModelSelect(ModelSelect): method __sql__ (line 7861) | def __sql__(self, ctx): method _get_cursor_wrapper (line 7864) | def _get_cursor_wrapper(self, cursor): class _ModelWriteQueryHelper (line 7868) | class _ModelWriteQueryHelper(_ModelQueryHelper): method __init__ (line 7869) | def __init__(self, model, *args, **kwargs): method returning (line 7873) | def returning(self, *returning): method _set_table_alias (line 7882) | def _set_table_alias(self, ctx): class ModelUpdate (line 7887) | class ModelUpdate(_ModelWriteQueryHelper, Update): class ModelInsert (line 7891) | class ModelInsert(_ModelWriteQueryHelper, Insert): method __init__ (line 7894) | def __init__(self, *args, **kwargs): method returning (line 7900) | def returning(self, *returning): method get_default_data (line 7909) | def get_default_data(self): method get_default_columns (line 7912) | def get_default_columns(self): class ModelDelete (line 7917) | class ModelDelete(_ModelWriteQueryHelper, Delete): class ManyToManyQuery (line 7921) | class ManyToManyQuery(ModelSelect): method __init__ (line 7922) | def __init__(self, instance, accessor, rel, *args, **kwargs): method _id_list (line 7929) | def _id_list(self, model_or_id_list): method add (line 7934) | def add(self, value, clear_existing=False): method remove (line 7957) | def remove(self, value): method clear (line 7979) | def clear(self): function safe_python_value (line 7987) | def safe_python_value(conv_func): class BaseModelCursorWrapper (line 7996) | class BaseModelCursorWrapper(DictCursorWrapper): method __init__ (line 7997) | def __init__(self, cursor, model, columns): method initialize (line 8002) | def initialize(self): method process_row (line 8083) | def process_row(self, row): class ModelDictCursorWrapper (line 8087) | class ModelDictCursorWrapper(BaseModelCursorWrapper): method initialize (line 8088) | def initialize(self): method process_row (line 8094) | def process_row(self, row): class ModelTupleCursorWrapper (line 8104) | class ModelTupleCursorWrapper(BaseModelCursorWrapper): method process_row (line 8107) | def process_row(self, row): class ModelNamedTupleCursorWrapper (line 8114) | class ModelNamedTupleCursorWrapper(ModelTupleCursorWrapper): method initialize (line 8115) | def initialize(self): class ModelObjectCursorWrapper (line 8122) | class ModelObjectCursorWrapper(ModelDictCursorWrapper): method __init__ (line 8123) | def __init__(self, cursor, model, select, constructor): method initialize (line 8128) | def initialize(self): method process_row (line 8132) | def process_row(self, row): class ModelCursorWrapper (line 8149) | class ModelCursorWrapper(BaseModelCursorWrapper): method __init__ (line 8150) | def __init__(self, cursor, model, select, from_list, joins, dicts=False): method initialize (line 8156) | def initialize(self): method process_row (line 8265) | def process_row(self, row): class PrefetchQuery (line 8331) | class PrefetchQuery(collections.namedtuple('_PrefetchQuery', ( method __new__ (line 8333) | def __new__(cls, query, fields=None, is_backref=None, rel_models=None, method populate_instance (line 8349) | def populate_instance(self, instance, id_map): method store_instance (line 8366) | def store_instance(self, instance, id_map): function prefetch_add_subquery (line 8377) | def prefetch_add_subquery(sq, subqueries, prefetch_type): function prefetch (line 8454) | def prefetch(sq, *subqueries, **kwargs): FILE: playhouse/apsw_ext.py class APSWDatabase (line 31) | class APSWDatabase(SqliteDatabase): method __init__ (line 34) | def __init__(self, database, **kwargs): method register_module (line 38) | def register_module(self, mod_name, mod_inst): method unregister_module (line 43) | def unregister_module(self, mod_name): method _connect (line 46) | def _connect(self): method _add_conn_hooks (line 57) | def _add_conn_hooks(self, conn): method _load_modules (line 61) | def _load_modules(self, conn): method _load_aggregates (line 66) | def _load_aggregates(self, conn): method _load_collations (line 72) | def _load_collations(self, conn): method _load_functions (line 76) | def _load_functions(self, conn): method _load_extensions (line 81) | def _load_extensions(self, conn): method load_extension (line 86) | def load_extension(self, extension): method last_insert_id (line 93) | def last_insert_id(self, cursor, query_type=None): method rows_affected (line 103) | def rows_affected(self, cursor): method begin (line 109) | def begin(self, lock_type='deferred'): method commit (line 112) | def commit(self): method rollback (line 120) | def rollback(self): function nh (line 129) | def nh(s, v): class BooleanField (line 133) | class BooleanField(_BooleanField): method db_value (line 134) | def db_value(self, v): class DateField (line 139) | class DateField(_DateField): class TimeField (line 142) | class TimeField(_TimeField): class DateTimeField (line 145) | class DateTimeField(_DateTimeField): class DecimalField (line 148) | class DecimalField(_DecimalField): FILE: playhouse/cockroachdb.py class ExceededMaxAttempts (line 32) | class ExceededMaxAttempts(OperationalError): pass class UUIDKeyField (line 35) | class UUIDKeyField(UUIDField): method __init__ (line 38) | def __init__(self, *args, **kwargs): class RowIDField (line 46) | class RowIDField(AutoField): method __init__ (line 49) | def __init__(self, *args, **kwargs): class CockroachDatabase (line 56) | class CockroachDatabase(PostgresqlDatabase): method __init__ (line 64) | def __init__(self, database, *args, **kwargs): method _set_server_version (line 73) | def _set_server_version(self, conn): method _get_pk_constraint (line 85) | def _get_pk_constraint(self, table, schema=None): method get_indexes (line 95) | def get_indexes(self, table, schema=None): method conflict_statement (line 102) | def conflict_statement(self, on_conflict, query): method conflict_update (line 113) | def conflict_update(self, oc, query): method extract_date (line 133) | def extract_date(self, date_part, date_field): method from_timestamp (line 136) | def from_timestamp(self, date_field): method begin (line 141) | def begin(self, system_time=None, priority=None): method atomic (line 152) | def atomic(self, system_time=None, priority=None): method savepoint (line 158) | def savepoint(self): method retry_transaction (line 164) | def retry_transaction(self, max_attempts=None, system_time=None, method run_transaction (line 174) | def run_transaction(self, cb, max_attempts=None, system_time=None, class _crdb_atomic (line 179) | class _crdb_atomic(_atomic): method __enter__ (line 180) | def __enter__(self): function run_transaction (line 187) | def run_transaction(db, callback, max_attempts=None, system_time=None, class PooledCockroachDatabase (line 219) | class PooledCockroachDatabase(_PooledPostgresqlDatabase, CockroachDataba... FILE: playhouse/cysqlite_ext.py function __status__ (line 34) | def __status__(flag, return_highwater=False): function __dbstatus__ (line 40) | def __dbstatus__(flag, return_highwater=False, return_current=False): class TDecimalField (line 56) | class TDecimalField(DecimalField): method get_modifiers (line 59) | def get_modifiers(self): pass method db_value (line 61) | def db_value(self, value): class CySqliteDatabase (line 66) | class CySqliteDatabase(SqliteDatabase): method __init__ (line 67) | def __init__(self, database, rank_functions=True, *args, **kwargs): method _connect (line 83) | def _connect(self): method _add_conn_hooks (line 95) | def _add_conn_hooks(self, conn): method _set_pragmas (line 113) | def _set_pragmas(self, conn): method _attach_databases (line 117) | def _attach_databases(self, conn): method _load_aggregates (line 121) | def _load_aggregates(self, conn): method _load_collations (line 125) | def _load_collations(self, conn): method _load_functions (line 129) | def _load_functions(self, conn): method _load_window_functions (line 133) | def _load_window_functions(self, conn): method register_table_function (line 137) | def register_table_function(self, klass, name=None): method unregister_table_function (line 144) | def unregister_table_function(self, name): method table_function (line 153) | def table_function(self, name=None): method on_commit (line 159) | def on_commit(self, fn): method on_rollback (line 165) | def on_rollback(self, fn): method on_update (line 171) | def on_update(self, fn): method authorizer (line 177) | def authorizer(self, fn): method trace (line 183) | def trace(self, fn, mask=2, expand_sql=True): method slow_query_log (line 193) | def slow_query_log(self, threshold_ms=50, logger=None, method progress (line 206) | def progress(self, fn, n=1): method begin (line 216) | def begin(self, lock_type='deferred'): method commit (line 220) | def commit(self): method rollback (line 224) | def rollback(self): method autocommit (line 229) | def autocommit(self): method blob_open (line 232) | def blob_open(self, table, column, rowid, read_only=False, dbname=None): method backup (line 236) | def backup(self, destination, pages=None, name=None, progress=None, method backup_to_file (line 249) | def backup_to_file(self, filename, pages=None, name=None, progress=None, class PooledCySqliteDatabase (line 288) | class PooledCySqliteDatabase(_PooledSqliteDatabase, CySqliteDatabase): function _sqlite_regexp (line 294) | def _sqlite_regexp(regex, value): FILE: playhouse/dataset.py class DataSet (line 18) | class DataSet(object): method __init__ (line 19) | def __init__(self, url, include_views=False, **kwargs): method __repr__ (line 52) | def __repr__(self): method get_export_formats (line 55) | def get_export_formats(self): method get_import_formats (line 61) | def get_import_formats(self): method __getitem__ (line 67) | def __getitem__(self, table): method tables (line 73) | def tables(self): method views (line 80) | def views(self): method __contains__ (line 83) | def __contains__(self, table): method connect (line 86) | def connect(self, reuse_if_open=False): method close (line 89) | def close(self): method update_cache (line 92) | def update_cache(self, table=None): method get_table_dependencies (line 112) | def get_table_dependencies(self, table): method __enter__ (line 125) | def __enter__(self): method __exit__ (line 129) | def __exit__(self, exc_type, exc_val, exc_tb): method query (line 133) | def query(self, sql, params=None): method transaction (line 136) | def transaction(self): method _check_arguments (line 139) | def _check_arguments(self, filename, file_obj, format, format_dict): method freeze (line 151) | def freeze(self, query, format='csv', filename=None, file_obj=None, method thaw (line 168) | def thaw(self, table, format='csv', filename=None, file_obj=None, class Table (line 189) | class Table(object): method __init__ (line 190) | def __init__(self, dataset, name, model_class): method model_class (line 199) | def model_class(self): method __repr__ (line 202) | def __repr__(self): method __len__ (line 205) | def __len__(self): method __iter__ (line 208) | def __iter__(self): method _create_model (line 211) | def _create_model(self): method create_index (line 219) | def create_index(self, columns, unique=False): method _guess_field_type (line 224) | def _guess_field_type(self, value): method columns (line 240) | def columns(self): method _migrate_new_columns (line 243) | def _migrate_new_columns(self, data): method __getitem__ (line 259) | def __getitem__(self, item): method __setitem__ (line 265) | def __setitem__(self, item, value): method __delitem__ (line 279) | def __delitem__(self, item): method insert (line 282) | def insert(self, **data): method _apply_where (line 286) | def _apply_where(self, query, filters, conjunction=None): method update (line 295) | def update(self, columns=None, conjunction=None, **data): method _query (line 307) | def _query(self, **query): method find (line 310) | def find(self, **query): method find_one (line 313) | def find_one(self, **query): method all (line 319) | def all(self): method delete (line 322) | def delete(self, **query): method freeze (line 325) | def freeze(self, *args, **kwargs): method thaw (line 328) | def thaw(self, *args, **kwargs): class Exporter (line 332) | class Exporter(object): method __init__ (line 333) | def __init__(self, query, iso8601_datetimes=False, base64_bytes=False): method export (line 338) | def export(self, file_obj): class JSONExporter (line 345) | class JSONExporter(Exporter): method _make_default (line 346) | def _make_default(self): method export (line 364) | def export(self, file_obj, **kwargs): class CSVExporter (line 372) | class CSVExporter(Exporter): method export (line 373) | def export(self, file_obj, header=True, **kwargs): class TSVExporter (line 399) | class TSVExporter(CSVExporter): method export (line 400) | def export(self, file_obj, header=True, **kwargs): class Importer (line 405) | class Importer(object): method __init__ (line 406) | def __init__(self, table, strict=False, iso8601_datetimes=False, method load (line 417) | def load(self, file_obj): class JSONImporter (line 421) | class JSONImporter(Importer): method load (line 422) | def load(self, file_obj, **kwargs): class CSVImporter (line 454) | class CSVImporter(Importer): method load (line 455) | def load(self, file_obj, header=True, **kwargs): class TSVImporter (line 502) | class TSVImporter(CSVImporter): method load (line 503) | def load(self, file_obj, header=True, **kwargs): FILE: playhouse/db_url.py function register_database (line 20) | def register_database(db_class, *names): function parseresult_to_dict (line 25) | def parseresult_to_dict(parsed, unquote_password=False, unquote_user=Fal... function parse (line 73) | def parse(url, unquote_password=False, unquote_user=False): function connect (line 77) | def connect(url, unquote_password=False, unquote_user=False, **connect_p... FILE: playhouse/fields.py class CompressedField (line 14) | class CompressedField(BlobField): method __init__ (line 22) | def __init__(self, compression_level=6, algorithm=ZLIB, *args, method python_value (line 36) | def python_value(self, value): method db_value (line 40) | def db_value(self, value): class PickleField (line 46) | class PickleField(BlobField): method python_value (line 47) | def python_value(self, value): method db_value (line 51) | def db_value(self, value): FILE: playhouse/flask_utils.py class PaginatedQuery (line 15) | class PaginatedQuery(object): method __init__ (line 16) | def __init__(self, query_or_model, paginate_by, page_var='page', page=... method get_page (line 30) | def get_page(self): method get_page_count (line 39) | def get_page_count(self): method get_object_list (line 45) | def get_object_list(self): method get_page_range (line 50) | def get_page_range(self, page, total, show=5): function get_object_or_404 (line 60) | def get_object_or_404(query_or_model, *query): function object_list (line 68) | def object_list(template_name, query, context_variable='object_list', function get_current_url (line 84) | def get_current_url(): function get_next_url (line 89) | def get_next_url(default='/'): class FlaskDB (line 96) | class FlaskDB(object): method __init__ (line 135) | def __init__(self, app=None, database=None, model_class=Model, method init_app (line 145) | def init_app(self, app): method _load_database (line 165) | def _load_database(self, app, config_value): method _load_from_config_dict (line 179) | def _load_from_config_dict(self, config_dict): method _register_handlers (line 207) | def _register_handlers(self, app): method get_model_class (line 211) | def get_model_class(self): method Model (line 222) | def Model(self): method connect_db (line 232) | def connect_db(self): method close_db (line 237) | def close_db(self, exc): FILE: playhouse/hybrid.py class hybrid_method (line 6) | class hybrid_method(ModelDescriptor): method __init__ (line 7) | def __init__(self, func, expr=None): method __get__ (line 11) | def __get__(self, instance, instance_type): method expression (line 16) | def expression(self, expr): class hybrid_property (line 21) | class hybrid_property(ModelDescriptor): method __init__ (line 22) | def __init__(self, fget, fset=None, fdel=None, expr=None): method __get__ (line 28) | def __get__(self, instance, instance_type): method __set__ (line 33) | def __set__(self, instance, value): method __delete__ (line 38) | def __delete__(self, instance): method setter (line 43) | def setter(self, fset): method deleter (line 47) | def deleter(self, fdel): method expression (line 51) | def expression(self, expr): FILE: playhouse/kv.py class KeyValue (line 16) | class KeyValue(object): method __init__ (line 26) | def __init__(self, key_field=None, value_field=None, ordered=False, method create_model (line 58) | def create_model(self): method query (line 67) | def query(self, *select): method convert_expression (line 73) | def convert_expression(self, expr): method __contains__ (line 78) | def __contains__(self, key): method __len__ (line 82) | def __len__(self): method __getitem__ (line 85) | def __getitem__(self, expr): method _upsert (line 96) | def _upsert(self, key, value): method _postgres_upsert (line 102) | def _postgres_upsert(self, key, value): method __setitem__ (line 109) | def __setitem__(self, expr, value): method __delitem__ (line 115) | def __delitem__(self, expr): method __iter__ (line 119) | def __iter__(self): method keys (line 122) | def keys(self): method values (line 125) | def values(self): method items (line 128) | def items(self): method _update (line 131) | def _update(self, __data=None, **mapping): method _postgres_update (line 140) | def _postgres_update(self, __data=None, **mapping): method get (line 150) | def get(self, key, default=None): method setdefault (line 156) | def setdefault(self, key, default=None): method pop (line 163) | def pop(self, key, default=Sentinel): method clear (line 175) | def clear(self): FILE: playhouse/migrate.py class Operation (line 138) | class Operation(object): method __init__ (line 140) | def __init__(self, migrator, method, *args, **kwargs): method execute (line 146) | def execute(self, node): method _handle_result (line 149) | def _handle_result(self, result): method run (line 158) | def run(self): function operation (line 165) | def operation(fn): function make_index_name (line 175) | def make_index_name(table_name, columns): class SchemaMigrator (line 183) | class SchemaMigrator(object): method __init__ (line 187) | def __init__(self, database): method make_context (line 190) | def make_context(self): method from_database (line 194) | def from_database(cls, database): method apply_default (line 206) | def apply_default(self, table, column_name, field): method _alter_table (line 221) | def _alter_table(self, ctx, table): method _alter_column (line 224) | def _alter_column(self, ctx, table, column): method alter_add_column (line 231) | def alter_add_column(self, table, column_name, field): method add_constraint (line 252) | def add_constraint(self, table, name, constraint): method add_unique (line 261) | def add_unique(self, table, *column_names): method drop_constraint (line 269) | def drop_constraint(self, table, name): method add_inline_fk_sql (line 275) | def add_inline_fk_sql(self, ctx, field): method add_foreign_key_constraint (line 288) | def add_foreign_key_constraint(self, table, column_name, rel, rel_column, method add_column (line 314) | def add_column(self, table, column_name, field): method drop_foreign_key_constraint (line 353) | def drop_foreign_key_constraint(self, table, column_name): method drop_column (line 357) | def drop_column(self, table, column_name, cascade=True): method rename_column (line 375) | def rename_column(self, table, old_name, new_name): method add_not_null (line 384) | def add_not_null(self, table, column): method drop_not_null (line 390) | def drop_not_null(self, table, column): method add_column_default (line 396) | def add_column_default(self, table, column, default): method drop_column_default (line 414) | def drop_column_default(self, table, column): method alter_column_type (line 422) | def alter_column_type(self, table, column, field, cast=None): method rename_table (line 436) | def rename_table(self, old_name, new_name): method add_index (line 443) | def add_index(self, table, columns, unique=False, using=None): method drop_index (line 452) | def drop_index(self, table, index_name): class PostgresqlMigrator (line 459) | class PostgresqlMigrator(SchemaMigrator): method _primary_key_columns (line 460) | def _primary_key_columns(self, tbl): method set_search_path (line 475) | def set_search_path(self, schema_name): method rename_table (line 482) | def rename_table(self, old_name, new_name): class CockroachDBMigrator (line 506) | class CockroachDBMigrator(PostgresqlMigrator): method add_inline_fk_sql (line 509) | def add_inline_fk_sql(self, ctx, field): method drop_index (line 513) | def drop_index(self, table, index_name): class MySQLColumn (line 521) | class MySQLColumn(namedtuple('_Column', ('name', 'definition', 'null', '... method is_pk (line 524) | def is_pk(self): method is_unique (line 528) | def is_unique(self): method is_null (line 532) | def is_null(self): method sql (line 535) | def sql(self, column_name=None, is_null=None): class MySQLMigrator (line 556) | class MySQLMigrator(SchemaMigrator): method _alter_column (line 560) | def _alter_column(self, ctx, table, column): method rename_table (line 567) | def rename_table(self, old_name, new_name): method _get_column_definition (line 575) | def _get_column_definition(self, table, column_name): method get_foreign_key_constraint (line 585) | def get_foreign_key_constraint(self, table, column_name): method drop_foreign_key_constraint (line 603) | def drop_foreign_key_constraint(self, table, column_name): method add_inline_fk_sql (line 610) | def add_inline_fk_sql(self, ctx, field): method add_not_null (line 614) | def add_not_null(self, table, column): method drop_not_null (line 637) | def drop_not_null(self, table, column): method rename_column (line 647) | def rename_column(self, table, old_name, new_name): method alter_column_type (line 675) | def alter_column_type(self, table, column, field, cast=None): method drop_index (line 688) | def drop_index(self, table, index_name): class SqliteMigrator (line 697) | class SqliteMigrator(SchemaMigrator): method _get_column_names (line 707) | def _get_column_names(self, table): method _get_create_table (line 712) | def _get_create_table(self, table): method _update_column (line 720) | def _update_column(self, table, column_to_update, fn): method _fix_index (line 832) | def _fix_index(self, sql, column_to_update, new_column): method drop_column (line 865) | def drop_column(self, table, column_name, cascade=True, legacy=False): method rename_column (line 875) | def rename_column(self, table, old_name, new_name, legacy=False): method add_not_null (line 896) | def add_not_null(self, table, column): method drop_not_null (line 902) | def drop_not_null(self, table, column): method add_column_default (line 908) | def add_column_default(self, table, column, default): method drop_column_default (line 922) | def drop_column_default(self, table, column): method alter_column_type (line 930) | def alter_column_type(self, table, column, field, cast=None): method add_constraint (line 942) | def add_constraint(self, table, name, constraint): method drop_constraint (line 946) | def drop_constraint(self, table, name): method add_foreign_key_constraint (line 950) | def add_foreign_key_constraint(self, table, column_name, field, function migrate (line 955) | def migrate(*operations, **kwargs): FILE: playhouse/mysql_ext.py class MySQLConnectorDatabase (line 23) | class MySQLConnectorDatabase(MySQLDatabase): method _connect (line 24) | def _connect(self): method cursor (line 30) | def cursor(self, named_cursor=None): method get_binary_type (line 38) | def get_binary_type(self): class PooledMySQLConnectorDatabase (line 42) | class PooledMySQLConnectorDatabase(_PooledMySQLDatabase, class MariaDBConnectorDatabase (line 47) | class MariaDBConnectorDatabase(MySQLDatabase): method _connect (line 48) | def _connect(self): method cursor (line 57) | def cursor(self, named_cursor=None): method _set_server_version (line 65) | def _set_server_version(self, conn): method last_insert_id (line 73) | def last_insert_id(self, cursor, query_type=None): method get_binary_type (line 83) | def get_binary_type(self): class PooledMariaDBConnectorDatabase (line 87) | class PooledMariaDBConnectorDatabase(_PooledMySQLDatabase, class JSONField (line 92) | class JSONField(TextField): method __init__ (line 95) | def __init__(self, json_dumps=None, json_loads=None, **kwargs): method python_value (line 100) | def python_value(self, value): method db_value (line 107) | def db_value(self, value): method extract (line 113) | def extract(self, path): function Match (line 117) | def Match(columns, expr, modifier=None): FILE: playhouse/pool.py function make_int (line 15) | def make_int(val): class MaxConnectionsExceeded (line 21) | class MaxConnectionsExceeded(ValueError): pass class _sentinel (line 27) | class _sentinel(object): method __lt__ (line 28) | def __lt__(self, other): function locked (line 32) | def locked(fn): class PooledDatabase (line 40) | class PooledDatabase(object): method __init__ (line 41) | def __init__(self, database, max_connections=20, stale_timeout=None, method init (line 74) | def init(self, database, max_connections=None, stale_timeout=None, method connect (line 86) | def connect(self, reuse_if_open=False): method _connect (line 104) | def _connect(self): method _is_stale (line 138) | def _is_stale(self, timestamp): method _is_closed (line 143) | def _is_closed(self, conn): method _can_reuse (line 146) | def _can_reuse(self, conn): method _close_raw (line 150) | def _close_raw(self, conn): method _close (line 158) | def _close(self, conn, close_conn=False): method manual_close (line 189) | def manual_close(self): method close_idle (line 207) | def close_idle(self): method close_stale (line 215) | def close_stale(self, age=600): method close_all (line 231) | def close_all(self): class _PooledMySQLDatabase (line 243) | class _PooledMySQLDatabase(PooledDatabase): method _is_closed (line 244) | def _is_closed(self, conn): class PooledMySQLDatabase (line 255) | class PooledMySQLDatabase(_PooledMySQLDatabase, MySQLDatabase): class _PooledPostgresqlDatabase (line 259) | class _PooledPostgresqlDatabase(PooledDatabase): method _is_closed (line 260) | def _is_closed(self, conn): method _can_reuse (line 265) | def _can_reuse(self, conn): class PooledPostgresqlDatabase (line 268) | class PooledPostgresqlDatabase(_PooledPostgresqlDatabase, PostgresqlData... class _PooledSqliteDatabase (line 272) | class _PooledSqliteDatabase(PooledDatabase): method _is_closed (line 273) | def _is_closed(self, conn): class PooledSqliteDatabase (line 280) | class PooledSqliteDatabase(_PooledSqliteDatabase, SqliteDatabase): FILE: playhouse/postgres_ext.py function register_hstore (line 25) | def register_hstore(*args): pass function register_hstore_pg3 (line 31) | def register_hstore_pg3(*args): pass class Json (line 58) | class Json(Node): method __init__ (line 62) | def __init__(self, value, dumps=None): method __sql__ (line 66) | def __sql__(self, ctx): class _LookupNode (line 70) | class _LookupNode(ColumnBase): method __init__ (line 71) | def __init__(self, node, parts): method clone (line 76) | def clone(self): method __hash__ (line 79) | def __hash__(self): class ObjectSlice (line 83) | class ObjectSlice(_LookupNode): method create (line 85) | def create(cls, node, value): method __sql__ (line 98) | def __sql__(self, ctx): method __getitem__ (line 107) | def __getitem__(self, value): class IndexedFieldMixin (line 111) | class IndexedFieldMixin(object): method __init__ (line 114) | def __init__(self, *args, **kwargs): class ArrayField (line 119) | class ArrayField(IndexedFieldMixin, Field): method __init__ (line 122) | def __init__(self, field_class=IntegerField, field_kwargs=None, method bind (line 130) | def bind(self, model, name, set_attribute=True): method ddl_datatype (line 135) | def ddl_datatype(self, ctx): method db_value (line 139) | def db_value(self, value): method python_value (line 147) | def python_value(self, value): method _process (line 157) | def _process(self, conv, value, dimensions): method __getitem__ (line 164) | def __getitem__(self, value): method _e (line 167) | def _e(op): method contains (line 179) | def contains(self, *items): method contains_any (line 182) | def contains_any(self, *items): method contained_by (line 185) | def contained_by(self, *items): class ArrayValue (line 189) | class ArrayValue(Node): method __init__ (line 190) | def __init__(self, field, value): method __sql__ (line 194) | def __sql__(self, ctx): class DateTimeTZField (line 201) | class DateTimeTZField(DateTimeField): class HStoreField (line 205) | class HStoreField(IndexedFieldMixin, Field): method __getitem__ (line 209) | def __getitem__(self, key): method keys (line 212) | def keys(self): method values (line 215) | def values(self): method items (line 218) | def items(self): method slice (line 221) | def slice(self, *args): method exists (line 224) | def exists(self, key): method defined (line 227) | def defined(self, key): method update (line 230) | def update(self, __data=None, **data): method delete (line 235) | def delete(self, *keys): method contains (line 239) | def contains(self, value): method contains_any (line 248) | def contains_any(self, *keys): class _JsonLookupBase (line 252) | class _JsonLookupBase(_LookupNode): method __init__ (line 253) | def __init__(self, node, parts, as_json=False): method clone (line 258) | def clone(self): method as_json (line 262) | def as_json(self, as_json=True): method concat (line 265) | def concat(self, rhs): method contains (line 270) | def contains(self, other): method contained_by (line 275) | def contained_by(self, other): method contains_any (line 280) | def contains_any(self, *keys): method contains_all (line 286) | def contains_all(self, *keys): method has_key (line 292) | def has_key(self, key): method remove (line 295) | def remove(self): method length (line 300) | def length(self): method extract (line 304) | def extract(self, *path): method path (line 309) | def path(self, *keys): class JsonLookup (line 313) | class JsonLookup(_JsonLookupBase): method __getitem__ (line 314) | def __getitem__(self, value): method __sql__ (line 317) | def __sql__(self, ctx): class JsonPath (line 329) | class JsonPath(_JsonLookupBase): method __sql__ (line 330) | def __sql__(self, ctx): class JSONField (line 337) | class JSONField(FieldDatabaseHook, Field): method __init__ (line 341) | def __init__(self, dumps=None, **kwargs): method _db_hook (line 345) | def _db_hook(self, database): method db_value (line 360) | def db_value(self, value): method to_value (line 365) | def to_value(self, value, case=False): method __getitem__ (line 372) | def __getitem__(self, value): method path (line 375) | def path(self, *keys): method concat (line 378) | def concat(self, value): method length (line 383) | def length(self): method extract (line 386) | def extract(self, *path): class BinaryJSONField (line 391) | class BinaryJSONField(IndexedFieldMixin, JSONField): method _db_hook (line 396) | def _db_hook(self, database): method contains (line 411) | def contains(self, other): method contained_by (line 416) | def contained_by(self, other): method contains_any (line 421) | def contains_any(self, *items): method contains_all (line 427) | def contains_all(self, *items): method has_key (line 433) | def has_key(self, key): method remove (line 436) | def remove(self, *items): method length (line 440) | def length(self): method extract (line 443) | def extract(self, *path): class TSVectorField (line 448) | class TSVectorField(IndexedFieldMixin, TextField): method match (line 452) | def match(self, query, language=None, plain=False): function Match (line 458) | def Match(field, query, language=None): class IntervalField (line 467) | class IntervalField(Field): class FetchManyCursor (line 471) | class FetchManyCursor(object): method __init__ (line 474) | def __init__(self, cursor, array_size=None): method description (line 481) | def description(self): method close (line 484) | def close(self): method row_gen (line 488) | def row_gen(self): method fetchone (line 499) | def fetchone(self): class ServerSideQuery (line 508) | class ServerSideQuery(Node): method __init__ (line 509) | def __init__(self, query, array_size=None): method __sql__ (line 514) | def __sql__(self, ctx): method __iter__ (line 517) | def __iter__(self): method close (line 522) | def close(self): method iterator (line 529) | def iterator(self): method _execute (line 534) | def _execute(self, database): function ServerSide (line 542) | def ServerSide(query, array_size=None): class _empty_object (line 548) | class _empty_object(object): method __nonzero__ (line 550) | def __nonzero__(self): class Psycopg2ExtAdapter (line 555) | class Psycopg2ExtAdapter(Psycopg2Adapter): method register_hstore (line 556) | def register_hstore(self, conn): method server_side_cursor (line 559) | def server_side_cursor(self, conn): class Psycopg3ExtAdapter (line 565) | class Psycopg3ExtAdapter(Psycopg3Adapter): method register_hstore (line 566) | def register_hstore(self, conn): method server_side_cursor (line 570) | def server_side_cursor(self, conn): class PostgresqlExtDatabase (line 574) | class PostgresqlExtDatabase(PostgresqlDatabase): method __init__ (line 578) | def __init__(self, *args, **kwargs): method _connect (line 583) | def _connect(self): method cursor (line 589) | def cursor(self, named_cursor=None): method execute (line 599) | def execute(self, query, named_cursor=False, array_size=None, method execute_sql (line 610) | def execute_sql(self, sql, params=None, named_cursor=None): class PooledPostgresqlExtDatabase (line 618) | class PooledPostgresqlExtDatabase(_PooledPostgresqlDatabase, PostgresqlE... class Psycopg3Database (line 622) | class Psycopg3Database(PostgresqlExtDatabase): method __init__ (line 623) | def __init__(self, *args, **kwargs): class PooledPsycopg3Database (line 628) | class PooledPsycopg3Database(_PooledPostgresqlDatabase, Psycopg3Database): FILE: playhouse/pwasyncio.py class MissingGreenletBridge (line 34) | class MissingGreenletBridge(RuntimeError): function greenlet_spawn (line 38) | async def greenlet_spawn(fn, *args, **kwargs): function await_ (line 68) | def await_(awaitable): class _State (line 76) | class _State(object): method __init__ (line 79) | def __init__(self): method reset (line 83) | def reset(self): class _ConnectionState (line 89) | class _ConnectionState(object): method __init__ (line 90) | def __init__(self): method _current (line 97) | def _current(self): method _on_task_done (line 128) | def _on_task_done(self, task): method conn (line 136) | def conn(self): method closed (line 140) | def closed(self): method transactions (line 144) | def transactions(self): method reset (line 147) | def reset(self): method set_connection (line 154) | def set_connection(self, conn): class _async_transaction_helper (line 160) | class _async_transaction_helper(object): method __aenter__ (line 161) | async def __aenter__(self): method __aexit__ (line 164) | async def __aexit__(self, exc_typ, exc, tb): method acommit (line 167) | async def acommit(self): method arollback (line 170) | async def arollback(self): class async_atomic (line 174) | class async_atomic(_async_transaction_helper, _atomic): pass class async_transaction (line 175) | class async_transaction(_async_transaction_helper, _transaction): pass class async_savepoint (line 176) | class async_savepoint(_async_transaction_helper, _savepoint): pass class AsyncDatabaseMixin (line 179) | class AsyncDatabaseMixin(object): method __init__ (line 180) | def __init__(self, database, **kwargs): method execute_sql (line 191) | def execute_sql(self, sql, params=None): method aexecute_sql (line 199) | async def aexecute_sql(self, sql, params=None): method connect (line 204) | def connect(self): method aconnect (line 207) | async def aconnect(self): method close (line 225) | def close(self): method aclose (line 228) | async def aclose(self): method _acquire_conn_async (line 235) | async def _acquire_conn_async(self): method _create_pool_async (line 244) | async def _create_pool_async(self): method _pool_acquire (line 247) | async def _pool_acquire(self): method _pool_release (line 250) | async def _pool_release(self, conn): method close_pool (line 253) | async def close_pool(self): method _pool_close (line 289) | async def _pool_close(self): method __aenter__ (line 292) | async def __aenter__(self): method __aexit__ (line 296) | async def __aexit__(self, exc_typ, exc, tb): method atomic (line 299) | def atomic(self): method transaction (line 302) | def transaction(self): method savepoint (line 305) | def savepoint(self): method acreate_tables (line 308) | async def acreate_tables(self, *args, **kwargs): method adrop_tables (line 311) | async def adrop_tables(self, *args, **kwargs): method aexecute (line 314) | async def aexecute(self, query): method get (line 318) | async def get(self, query): method list (line 321) | async def list(self, query): method scalar (line 324) | async def scalar(self, query): method count (line 327) | async def count(self, query): method exists (line 330) | async def exists(self, query): method aprefetch (line 333) | async def aprefetch(self, query, *subqueries): method iterate (line 336) | async def iterate(self, query, buffer_size=None): method run (line 361) | async def run(self, fn, *args, **kwargs): method is_closed (line 364) | def is_closed(self): class CursorAdapter (line 371) | class CursorAdapter(object): method __init__ (line 374) | def __init__(self, rows=None, lastrowid=None, rowcount=None, method fetchone (line 390) | def fetchone(self): method _lazy_fetchone (line 399) | def _lazy_fetchone(self): method fetchall (line 410) | def fetchall(self): method __iter__ (line 415) | def __iter__(self): method close (line 420) | def close(self): method aclose (line 423) | async def aclose(self): function _lazy_cursor_iter (line 432) | def _lazy_cursor_iter(cursor): class DummyCursor (line 440) | class DummyCursor(object): method __init__ (line 441) | def __init__(self, conn): method execute (line 444) | def execute(self, sql, params=None): method _async_execute (line 447) | async def _async_execute(self, sql, params): class AsyncConnectionWrapper (line 451) | class AsyncConnectionWrapper(object): method __init__ (line 452) | def __init__(self, conn): method execute (line 456) | async def execute(self, sql, params=None): method _execute (line 460) | async def _execute(self, sql, params): method cursor (line 463) | def cursor(self): method execute_iter (line 466) | async def execute_iter(self, sql, params=None): method close (line 469) | async def close(self): class AsyncSqlitePool (line 475) | class AsyncSqlitePool(object): method __init__ (line 476) | def __init__(self, database, pool_size=5, on_connect=None, method initialize (line 486) | async def initialize(self): method _create_connection (line 492) | async def _create_connection(self): method acquire (line 503) | async def acquire(self, timeout=None): method _conn_is_valid (line 508) | def _conn_is_valid(self, conn): method release (line 516) | async def release(self, conn): method close (line 528) | async def close(self): class AsyncSqliteConnection (line 539) | class AsyncSqliteConnection(AsyncConnectionWrapper): method _execute (line 540) | async def _execute(self, sql, params=None): method execute_iter (line 551) | async def execute_iter(self, sql, params=None): class AsyncSqliteDatabase (line 576) | class AsyncSqliteDatabase(AsyncDatabaseMixin, SqliteDatabase): method _create_pool_async (line 577) | async def _create_pool_async(self): method _add_conn_hooks (line 584) | async def _add_conn_hooks(self, conn): method _set_pragmas (line 590) | async def _set_pragmas(self, conn): method _load_functions (line 594) | async def _load_functions(self, conn): method _pool_acquire (line 599) | async def _pool_acquire(self): method _pool_release (line 602) | async def _pool_release(self, conn): method _pool_close (line 606) | async def _pool_close(self): class AsyncMySQLConnection (line 611) | class AsyncMySQLConnection(AsyncConnectionWrapper): method _execute (line 612) | async def _execute(self, sql, params=None): method execute_iter (line 626) | async def execute_iter(self, sql, params=None): class AsyncMySQLDatabase (line 653) | class AsyncMySQLDatabase(AsyncDatabaseMixin, MySQLDatabase): method _create_pool_async (line 654) | async def _create_pool_async(self): method _pool_acquire (line 664) | async def _pool_acquire(self): method _pool_release (line 670) | async def _pool_release(self, conn): method _pool_close (line 674) | async def _pool_close(self): class AsyncPostgresqlConnection (line 679) | class AsyncPostgresqlConnection(AsyncConnectionWrapper): method _execute (line 680) | async def _execute(self, sql, params=None): method execute_iter (line 695) | async def execute_iter(self, sql, params=None): method _translate_placeholders (line 732) | def _translate_placeholders(sql): class AsyncPgAdapter (line 743) | class AsyncPgAdapter(Psycopg3Adapter): method __init__ (line 744) | def __init__(self): class AsyncPgAtomic (line 750) | class AsyncPgAtomic(object): method __init__ (line 751) | def __init__(self, db, *args, **kwargs): method __enter__ (line 755) | def __enter__(self): method __exit__ (line 760) | def __exit__(self, exc_type, exc_val, exc_tb): method commit (line 771) | def commit(self, begin=True): method rollback (line 774) | def rollback(self, begin=True): method _abegin (line 777) | async def _abegin(self): method acommit (line 784) | async def acommit(self, begin=True): method arollback (line 789) | async def arollback(self, begin=True): method __aenter__ (line 794) | async def __aenter__(self): method __aexit__ (line 799) | async def __aexit__(self, exc_type, exc_val, exc_tb): class AsyncPostgresqlDatabase (line 811) | class AsyncPostgresqlDatabase(AsyncDatabaseMixin, PostgresqlDatabase): method register_adapters (line 814) | async def register_adapters(self, conn): method _create_pool_async (line 832) | async def _create_pool_async(self): method _pool_acquire (line 842) | async def _pool_acquire(self): method _pool_release (line 848) | async def _pool_release(self, conn): method _pool_close (line 852) | async def _pool_close(self): method atomic (line 855) | def atomic(self, *args, **kwargs): method transaction (line 857) | def transaction(self, *args, **kwargs): method savepoint (line 859) | def savepoint(self, *args, **kwargs): FILE: playhouse/pydantic_utils.py function choices_to_literal (line 19) | def choices_to_literal(choices): function choices_description (line 22) | def choices_description(choices): function get_field_type (line 25) | def get_field_type(field): function to_pydantic (line 30) | def to_pydantic(model_cls, exclude=None, include=None, exclude_autofield... FILE: playhouse/reflection.py class UnknownField (line 66) | class UnknownField(object): class Column (line 70) | class Column(object): method __init__ (line 76) | def __init__(self, name, field_class, raw_column_type, nullable, method __repr__ (line 95) | def __repr__(self): method get_field_parameters (line 107) | def get_field_parameters(self): method is_primary_key (line 140) | def is_primary_key(self): method is_foreign_key (line 143) | def is_foreign_key(self): method is_self_referential_fk (line 146) | def is_self_referential_fk(self): method set_foreign_key (line 150) | def set_foreign_key(self, foreign_key, model_names, dest=None, method get_field (line 161) | def get_field(self): class Metadata (line 182) | class Metadata(object): method __init__ (line 186) | def __init__(self, database): method execute (line 190) | def execute(self, sql, *params): method get_columns (line 193) | def get_columns(self, table, schema=None): method get_column_types (line 227) | def get_column_types(self, table, schema=None): method _clean_default (line 230) | def _clean_default(self, field_class, default): method get_foreign_keys (line 239) | def get_foreign_keys(self, table, schema=None): method get_primary_keys (line 242) | def get_primary_keys(self, table, schema=None): method get_indexes (line 245) | def get_indexes(self, table, schema=None): class PostgresqlMetadata (line 249) | class PostgresqlMetadata(Metadata): method __init__ (line 285) | def __init__(self, database): method get_column_types (line 307) | def get_column_types(self, table, schema): method get_columns (line 333) | def get_columns(self, table, schema=None): method get_foreign_keys (line 337) | def get_foreign_keys(self, table, schema=None): method get_primary_keys (line 341) | def get_primary_keys(self, table, schema=None): method get_indexes (line 345) | def get_indexes(self, table, schema=None): class CockroachDBMetadata (line 350) | class CockroachDBMetadata(PostgresqlMetadata): method __init__ (line 359) | def __init__(self, database): class MySQLMetadata (line 377) | class MySQLMetadata(Metadata): method __init__ (line 404) | def __init__(self, database, **kwargs): method get_column_types (line 409) | def get_column_types(self, table, schema=None): class SqliteMetadata (line 423) | class SqliteMetadata(Metadata): method _map_col (line 457) | def _map_col(self, column_type): method get_column_types (line 471) | def get_column_types(self, table, schema=None): class DatabaseMetadata (line 489) | class DatabaseMetadata(_DatabaseMetadata): method multi_column_indexes (line 490) | def multi_column_indexes(self, table): method column_indexes (line 500) | def column_indexes(self, table): class Introspector (line 508) | class Introspector(object): method __init__ (line 511) | def __init__(self, metadata, schema=None): method __repr__ (line 515) | def __repr__(self): method from_database (line 519) | def from_database(cls, database, schema=None): method get_database_class (line 536) | def get_database_class(self): method get_database_name (line 539) | def get_database_name(self): method get_database_kwargs (line 542) | def get_database_kwargs(self): method get_additional_imports (line 545) | def get_additional_imports(self): method make_model_name (line 550) | def make_model_name(self, table, snake_case=True): method make_column_name (line 559) | def make_column_name(self, column, is_foreign_key=False, snake_case=Tr... method introspect (line 577) | def introspect(self, table_names=None, literal_column_names=False, method generate_models (line 701) | def generate_models(self, skip_invalid=False, table_names=None, function introspect (line 819) | def introspect(database, schema=None): function generate_models (line 824) | def generate_models(database, schema=None, **options): function print_model (line 829) | def print_model(model, indexes=True, inline_indexes=False): function get_table_sql (line 869) | def get_table_sql(model): function print_table_sql (line 882) | def print_table_sql(model): FILE: playhouse/shortcuts.py function model_to_dict (line 13) | def model_to_dict(model, recurse=True, backrefs=False, only=None, function update_model_from_dict (line 130) | def update_model_from_dict(instance, data, ignore_unknown=False): function dict_to_model (line 172) | def dict_to_model(model_class, data, ignore_unknown=False): function insert_where (line 176) | def insert_where(cls, data, where=None): class ReconnectMixin (line 210) | class ReconnectMixin(object): method __init__ (line 242) | def __init__(self, *args, **kwargs): method execute_sql (line 251) | def execute_sql(self, sql, params=None): method begin (line 255) | def begin(self, *args, **kwargs): method _reconnect (line 259) | def _reconnect(self, func, *args, **kwargs): function resolve_multimodel_query (line 286) | def resolve_multimodel_query(query, key='_model_identifier'): class ThreadSafeDatabaseMetadata (line 309) | class ThreadSafeDatabaseMetadata(Metadata): method __init__ (line 318) | def __init__(self, *args, **kwargs): method _get_db (line 326) | def _get_db(self): method _set_db (line 328) | def _set_db(self, db): method set_database (line 334) | def set_database(self, database): method table (line 340) | def table(self): method table (line 345) | def table(self, value): method table (line 348) | def table(self): FILE: playhouse/signals.py class Signal (line 7) | class Signal(object): method __init__ (line 8) | def __init__(self): method _flush (line 11) | def _flush(self): method connect (line 15) | def connect(self, receiver, name=None, sender=None): method disconnect (line 25) | def disconnect(self, receiver=None, name=None, sender=None): method __call__ (line 40) | def __call__(self, name=None, sender=None): method send (line 46) | def send(self, instance, *args, **kwargs): class Model (line 62) | class Model(_Model): method __init__ (line 63) | def __init__(self, *args, **kwargs): method save (line 67) | def save(self, *args, **kwargs): method delete_instance (line 75) | def delete_instance(self, *args, **kwargs): FILE: playhouse/sqlcipher_ext.py class _SqlCipherDatabase (line 63) | class _SqlCipherDatabase(object): method _connect (line 66) | def _connect(self): method set_passphrase (line 80) | def set_passphrase(self, passphrase): method rekey (line 88) | def rekey(self, passphrase): class SqlCipherDatabase (line 97) | class SqlCipherDatabase(_SqlCipherDatabase, SqliteDatabase): FILE: playhouse/sqlite_changelog.py class BaseChangeLog (line 5) | class BaseChangeLog(Model): class ChangeLog (line 13) | class ChangeLog(object): method __init__ (line 55) | def __init__(self, db, table_name='changelog'): method _build_column_array (line 59) | def _build_column_array(self, model, use_old, use_new, skip_fields=None): method trigger_sql (line 84) | def trigger_sql(self, model, action, skip_fields=None): method drop_trigger_sql (line 97) | def drop_trigger_sql(self, model, action): method model (line 104) | def model(self): method install (line 114) | def install(self, model, skip_fields=None, drop=True, insert=True, FILE: playhouse/sqlite_ext.py class RowIDField (line 34) | class RowIDField(AutoField): method bind (line 38) | def bind(self, model, name, *args): class DocIDField (line 45) | class DocIDField(RowIDField): class AutoIncrementField (line 49) | class AutoIncrementField(AutoField): method ddl (line 50) | def ddl(self, ctx): class TDecimalField (line 55) | class TDecimalField(DecimalField): method get_modifiers (line 57) | def get_modifiers(self): pass class ISODateTimeField (line 60) | class ISODateTimeField(DateTimeField): method db_value (line 69) | def db_value(self, value): class JSONPath (line 74) | class JSONPath(ColumnBase): method __init__ (line 75) | def __init__(self, field, path=None): method _converter (line 80) | def _converter(self, value): method path (line 84) | def path(self): method __getitem__ (line 87) | def __getitem__(self, idx): method append (line 94) | def append(self, value, as_json=None): method _json_operation (line 99) | def _json_operation(self, func, value, as_json=None): method insert (line 104) | def insert(self, value, as_json=None): method set (line 107) | def set(self, value, as_json=None): method replace (line 110) | def replace(self, value, as_json=None): method update (line 113) | def update(self, value): method remove (line 116) | def remove(self): method json_type (line 119) | def json_type(self): method length (line 122) | def length(self): method children (line 125) | def children(self): method tree (line 128) | def tree(self): method __sql__ (line 131) | def __sql__(self, ctx): class JSONBPath (line 135) | class JSONBPath(JSONPath): method append (line 136) | def append(self, value, as_json=None): method _json_operation (line 141) | def _json_operation(self, func, value, as_json=None): method insert (line 146) | def insert(self, value, as_json=None): method set (line 149) | def set(self, value, as_json=None): method replace (line 152) | def replace(self, value, as_json=None): method update (line 155) | def update(self, value): method remove (line 158) | def remove(self): method __sql__ (line 161) | def __sql__(self, ctx): class JSONField (line 166) | class JSONField(TextField): method __init__ (line 171) | def __init__(self, json_dumps=None, json_loads=None, **kwargs): method python_value (line 176) | def python_value(self, value): method db_value (line 183) | def db_value(self, value): method _e (line 189) | def _e(op): method __getitem__ (line 203) | def __getitem__(self, item): method extract (line 206) | def extract(self, *paths): method extract_json (line 209) | def extract_json(self, path): method extract_text (line 211) | def extract_text(self, path): method append (line 214) | def append(self, value, as_json=None): method insert (line 217) | def insert(self, value, as_json=None): method set (line 220) | def set(self, value, as_json=None): method replace (line 223) | def replace(self, value, as_json=None): method update (line 226) | def update(self, data): method remove (line 229) | def remove(self, *paths): method json_type (line 234) | def json_type(self): method length (line 237) | def length(self, path=None): method children (line 241) | def children(self): method tree (line 258) | def tree(self): class JSONBField (line 262) | class JSONBField(JSONField): method db_value (line 266) | def db_value(self, value): method json (line 272) | def json(self): method extract (line 275) | def extract(self, *paths): method remove (line 279) | def remove(self, *paths): class SearchField (line 285) | class SearchField(Field): method __init__ (line 286) | def __init__(self, unindexed=False, column_name=None, **k): method match (line 293) | def match(self, term): method fts_column_index (line 297) | def fts_column_index(self): method highlight (line 304) | def highlight(self, left, right): method snippet (line 308) | def snippet(self, left, right, over_length='...', max_tokens=16): class VirtualTableSchemaManager (line 316) | class VirtualTableSchemaManager(SchemaManager): method _create_virtual_table (line 317) | def _create_virtual_table(self, safe=True, **options): method _create_table (line 360) | def _create_table(self, safe=True, **options): class VirtualModel (line 368) | class VirtualModel(Model): class Meta (line 369) | class Meta: method clean_options (line 377) | def clean_options(cls, options): class BaseFTSModel (line 381) | class BaseFTSModel(VirtualModel): method clean_options (line 383) | def clean_options(cls, options): class FTSModel (line 413) | class FTSModel(BaseFTSModel): class Meta (line 422) | class Meta: method _fts_cmd (line 426) | def _fts_cmd(cls, cmd): method optimize (line 433) | def optimize(cls): method rebuild (line 437) | def rebuild(cls): method integrity_check (line 441) | def integrity_check(cls): method merge (line 445) | def merge(cls, blocks=200, segments=8): method automerge (line 449) | def automerge(cls, state=True): method match (line 453) | def match(cls, term): method rank (line 460) | def rank(cls, *weights): method bm25 (line 465) | def bm25(cls, *weights): method bm25f (line 470) | def bm25f(cls, *weights): method lucene (line 475) | def lucene(cls, *weights): method _search (line 480) | def _search(cls, term, weights, with_score, score_alias, score_fn, method search (line 508) | def search(cls, term, weights=None, with_score=False, score_alias='sco... method search_bm25 (line 520) | def search_bm25(cls, term, weights=None, with_score=False, method search_bm25f (line 532) | def search_bm25f(cls, term, weights=None, with_score=False, method search_lucene (line 544) | def search_lucene(cls, term, weights=None, with_score=False, class FTS5Model (line 567) | class FTS5Model(BaseFTSModel): class Meta (line 625) | class Meta: method validate_model (line 636) | def validate_model(cls): method fts5_installed (line 647) | def fts5_installed(cls): method validate_query (line 669) | def validate_query(query): method clean_query (line 684) | def clean_query(query, replace=chr(26)): method match (line 708) | def match(cls, term): method rank (line 715) | def rank(cls, *args): method bm25 (line 719) | def bm25(cls, *weights): method search (line 723) | def search(cls, term, weights=None, with_score=False, score_alias='sco... method search_bm25 (line 734) | def search_bm25(cls, term, weights=None, with_score=False, method _fts_cmd_sql (line 762) | def _fts_cmd_sql(cls, cmd, **extra_params): method _fts_cmd (line 778) | def _fts_cmd(cls, cmd, **extra_params): method automerge (line 783) | def automerge(cls, level): method merge (line 789) | def merge(cls, npages): method optimize (line 793) | def optimize(cls): method rebuild (line 797) | def rebuild(cls): method set_pgsz (line 801) | def set_pgsz(cls, pgsz): method set_rank (line 805) | def set_rank(cls, rank_expression): method delete_all (line 809) | def delete_all(cls): method integrity_check (line 813) | def integrity_check(cls, rank=0): method VocabModel (line 817) | def VocabModel(cls, table_type='row', table=None): function match (line 852) | def match(lhs, rhs): FILE: playhouse/sqlite_udf.py function format_date_time_sqlite (line 31) | def format_date_time_sqlite(date_value): class synchronized_dict (line 54) | class synchronized_dict(dict): method __init__ (line 55) | def __init__(self, *args, **kwargs): method __getitem__ (line 59) | def __getitem__(self, key): method __setitem__ (line 63) | def __setitem__(self, key, value): method __delitem__ (line 67) | def __delitem__(self, key): function aggregate (line 76) | def aggregate(*groups): function udf (line 84) | def udf(group, name=None): function register_aggregate_groups (line 92) | def register_aggregate_groups(db, *groups): function register_udf_groups (line 102) | def register_udf_groups(db, *groups): function register_groups (line 111) | def register_groups(db, *groups): function register_all (line 115) | def register_all(db): function if_then_else (line 124) | def if_then_else(cond, truthy, falsey=None): function strip_tz (line 130) | def strip_tz(date_str): function human_delta (line 141) | def human_delta(nseconds, glue=', '): function file_ext (line 162) | def file_ext(filename): function file_read (line 170) | def file_read(filename): function gzip (line 178) | def gzip(data, compression=9): function gunzip (line 184) | def gunzip(data): function hostname (line 188) | def hostname(url): function toggle (line 194) | def toggle(key): function setting (line 200) | def setting(key, value=None): function clear_settings (line 208) | def clear_settings(): function clear_toggles (line 212) | def clear_toggles(): function randomrange (line 216) | def randomrange(start, end=None, step=None): function gauss_distribution (line 224) | def gauss_distribution(mean, sigma): function sqrt (line 231) | def sqrt(n): function tonumber (line 238) | def tonumber(s): function substr_count (line 248) | def substr_count(haystack, needle): function strip_chars (line 254) | def strip_chars(haystack, chars): function json_contains (line 258) | def json_contains(src_json, obj_json): class _heap_agg (line 297) | class _heap_agg(object): method __init__ (line 298) | def __init__(self): method process (line 302) | def process(self, value): method step (line 305) | def step(self, value): class _datetime_heap_agg (line 309) | class _datetime_heap_agg(_heap_agg): method process (line 310) | def process(self, value): class mintdiff (line 314) | class mintdiff(_datetime_heap_agg): method finalize (line 315) | def finalize(self): class avgtdiff (line 331) | class avgtdiff(_datetime_heap_agg): method finalize (line 332) | def finalize(self): class duration (line 355) | class duration(object): method __init__ (line 356) | def __init__(self): method step (line 359) | def step(self, value): method finalize (line 366) | def finalize(self): class mode (line 373) | class mode(object): method __init__ (line 374) | def __init__(self): method step (line 377) | def step(self, *args): method finalize (line 380) | def finalize(self): class minrange (line 385) | class minrange(_heap_agg): method finalize (line 386) | def finalize(self): class avgrange (line 407) | class avgrange(_heap_agg): method finalize (line 408) | def finalize(self): class _range (line 431) | class _range(object): method __init__ (line 434) | def __init__(self): method step (line 437) | def step(self, value): method finalize (line 443) | def finalize(self): class stddev (line 449) | class stddev(object): method __init__ (line 450) | def __init__(self): method step (line 453) | def step(self, v): method finalize (line 456) | def finalize(self): function _parse_match_info (line 463) | def _parse_match_info(buf): function get_weights (line 468) | def get_weights(ncol, raw_weights): function rank (line 478) | def rank(raw_match_info, *raw_weights): function bm25 (line 514) | def bm25(raw_match_info, *args): FILE: playhouse/sqliteq.py class ResultTimeout (line 24) | class ResultTimeout(Exception): class WriterPaused (line 27) | class WriterPaused(Exception): class ShutdownException (line 30) | class ShutdownException(Exception): class AsyncCursor (line 34) | class AsyncCursor(object): method __init__ (line 38) | def __init__(self, event, sql, params, timeout): method set_result (line 46) | def set_result(self, cursor, exc=None): method _wait (line 54) | def _wait(self, timeout=None): method __iter__ (line 62) | def __iter__(self): method next (line 69) | def next(self): method lastrowid (line 82) | def lastrowid(self): method rowcount (line 88) | def rowcount(self): method description (line 94) | def description(self): method close (line 99) | def close(self): method fetchall (line 104) | def fetchall(self): method fetchone (line 107) | def fetchone(self): class Writer (line 121) | class Writer(object): method __init__ (line 124) | def __init__(self, database, queue): method run (line 128) | def run(self): method wait_unpause (line 146) | def wait_unpause(self): method loop (line 161) | def loop(self, conn): method execute (line 180) | def execute(self, obj): class SqliteQueueDatabase (line 192) | class SqliteQueueDatabase(SqliteDatabase): method __init__ (line 199) | def __init__(self, database, use_gevent=False, autostart=True, method get_thread_impl (line 231) | def get_thread_impl(self, use_gevent): method _validate_journal_mode (line 234) | def _validate_journal_mode(self, pragmas=None): method _create_write_queue (line 246) | def _create_write_queue(self): method queue_size (line 249) | def queue_size(self): method execute_sql (line 252) | def execute_sql(self, sql, params=None, timeout=None): method start (line 264) | def start(self): method stop (line 277) | def stop(self): method is_stopped (line 299) | def is_stopped(self): method pause (line 303) | def pause(self): method unpause (line 313) | def unpause(self): method __unsupported__ (line 323) | def __unsupported__(self, *args, **kwargs): class ThreadHelper (line 328) | class ThreadHelper(object): method __init__ (line 331) | def __init__(self, queue_max_size=None): method event (line 334) | def event(self): return Event() method queue (line 336) | def queue(self, max_size=None): method thread (line 340) | def thread(self, fn, *args, **kwargs): class GreenletHelper (line 346) | class GreenletHelper(ThreadHelper): method event (line 349) | def event(self): return GEvent() method queue (line 351) | def queue(self, max_size=None): method thread (line 355) | def thread(self, fn, *args, **kwargs): FILE: playhouse/test_utils.py class _QueryLogHandler (line 8) | class _QueryLogHandler(logging.Handler): method __init__ (line 9) | def __init__(self, *args, **kwargs): method emit (line 13) | def emit(self, record): class count_queries (line 19) | class count_queries(object): method __init__ (line 20) | def __init__(self, only_select=False): method get_queries (line 24) | def get_queries(self): method __enter__ (line 27) | def __enter__(self): method __exit__ (line 33) | def __exit__(self, exc_type, exc_val, exc_tb): class assert_query_count (line 42) | class assert_query_count(count_queries): method __init__ (line 43) | def __init__(self, expected, only_select=False): method __call__ (line 47) | def __call__(self, f): method _assert_count (line 58) | def _assert_count(self): method __exit__ (line 62) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: pwiz.py function make_introspector (line 42) | def make_introspector(database_type, database_name, **kwargs): function print_models (line 53) | def print_models(introspector, tables=None, preserve_order=False, function print_header (line 148) | def print_header(cmd_line, introspector): function err (line 158) | def err(msg): function get_option_parser (line 162) | def get_option_parser(): function get_connect_kwargs (line 190) | def get_connect_kwargs(options): function main (line 197) | def main(): FILE: runtests.py function runtests (line 12) | def runtests(suite, verbosity=1, failfast=False): function get_option_parser (line 17) | def get_option_parser(): function collect_tests (line 70) | def collect_tests(args): function collect_asyncio_tests (line 85) | def collect_asyncio_tests(): FILE: tests/apsw_ext.py class User (line 12) | class User(TestModel): class Message (line 16) | class Message(TestModel): class VTSource (line 23) | class VTSource(object): method Create (line 24) | def Create(self, db, modulename, dbname, tablename, *args): class VTable (line 28) | class VTable(object): method BestIndex (line 29) | def BestIndex(self, *args): method Open (line 31) | def Open(self): method Disconnect (line 33) | def Disconnect(self): pass class VTCursor (line 35) | class VTCursor(object): method Filter (line 36) | def Filter(self, *a): method Eof (line 38) | def Eof(self): return False method Rowid (line 39) | def Rowid(self): method Column (line 41) | def Column(self, col): method Next (line 43) | def Next(self): method Close (line 45) | def Close(self): pass class TestAPSWExtension (line 48) | class TestAPSWExtension(ModelTestCase): method test_db_register_module (line 52) | def test_db_register_module(self): method test_db_register_function (line 59) | def test_db_register_function(self): method test_db_register_aggregate (line 67) | def test_db_register_aggregate(self): method test_db_register_collation (line 87) | def test_db_register_collation(self): method test_db_pragmas (line 104) | def test_db_pragmas(self): method test_select_insert (line 113) | def test_select_insert(self): method test_update_delete (line 133) | def test_update_delete(self): method test_transaction_handling (line 146) | def test_transaction_handling(self): method test_exists_regression (line 186) | def test_exists_regression(self): FILE: tests/base.py function db_loader (line 24) | def db_loader(engine, name='peewee_test', db_class=None, **params): function get_in_memory_db (line 52) | def get_in_memory_db(**params): function get_sqlite_db (line 56) | def get_sqlite_db(): function make_db_params (line 92) | def make_db_params(key): function new_connection (line 116) | def new_connection(**kwargs): class TestModel (line 156) | class TestModel(Model): class Meta (line 157) | class Meta: function __sql__ (line 162) | def __sql__(q, **state): class QueryLogHandler (line 166) | class QueryLogHandler(logging.Handler): method __init__ (line 167) | def __init__(self, *args, **kwargs): method emit (line 171) | def emit(self, record): class BaseTestCase (line 175) | class BaseTestCase(unittest.TestCase): method setUp (line 176) | def setUp(self): method tearDown (line 181) | def tearDown(self): method assertIsNone (line 184) | def assertIsNone(self, value): method assertIsNotNone (line 187) | def assertIsNotNone(self, value): method assertRaisesCtx (line 191) | def assertRaisesCtx(self, exceptions): method assertSQL (line 200) | def assertSQL(self, query, sql, params=None, **state): method assertHistory (line 209) | def assertHistory(self, n, expected): method history (line 216) | def history(self): method reset_sql_history (line 219) | def reset_sql_history(self): method assertQueryCount (line 223) | def assertQueryCount(self, num): class DatabaseTestCase (line 229) | class DatabaseTestCase(BaseTestCase): method setUp (line 232) | def setUp(self): method tearDown (line 238) | def tearDown(self): method execute (line 242) | def execute(self, sql, params=None): class ModelDatabaseTestCase (line 246) | class ModelDatabaseTestCase(DatabaseTestCase): method setUp (line 250) | def setUp(self): method tearDown (line 259) | def tearDown(self): class ModelTestCase (line 268) | class ModelTestCase(ModelDatabaseTestCase): method setUp (line 272) | def setUp(self): method tearDown (line 278) | def tearDown(self): function requires_models (line 287) | def requires_models(*models): function skip_if (line 306) | def skip_if(expr, reason='n/a'): function skip_unless (line 311) | def skip_unless(expr, reason='n/a'): function slow_test (line 316) | def slow_test(): function requires_sqlite (line 321) | def requires_sqlite(method): function requires_mysql (line 324) | def requires_mysql(method): function requires_postgresql (line 327) | def requires_postgresql(method): function requires_pglike (line 330) | def requires_pglike(method): FILE: tests/base_models.py class Person (line 6) | class Person(TestModel): class Meta (line 11) | class Meta: class Note (line 17) | class Note(TestModel): class Category (line 22) | class Category(TestModel): class Relationship (line 27) | class Relationship(TestModel): class Register (line 32) | class Register(TestModel): class User (line 36) | class User(TestModel): class Meta (line 39) | class Meta: class Account (line 43) | class Account(TestModel): class Tweet (line 48) | class Tweet(TestModel): class Favorite (line 54) | class Favorite(TestModel): class Sample (line 59) | class Sample(TestModel): class SampleMeta (line 64) | class SampleMeta(TestModel): class A (line 69) | class A(TestModel): class B (line 71) | class B(TestModel): class C (line 74) | class C(TestModel): class Emp (line 79) | class Emp(TestModel): class Meta (line 84) | class Meta: class OCTest (line 90) | class OCTest(TestModel): class UKVP (line 96) | class UKVP(TestModel): class Meta (line 101) | class Meta: class DfltM (line 109) | class DfltM(TestModel): FILE: tests/cockroachdb.py class KV (line 17) | class KV(TestModel): class Arr (line 21) | class Arr(TestModel): class JsonModel (line 25) | class JsonModel(TestModel): class Normal (line 28) | class Normal(TestModel): class UID (line 31) | class UID(TestModel): class RID (line 35) | class RID(TestModel): class UIDNote (line 39) | class UIDNote(TestModel): class TestCockroachDatabase (line 45) | class TestCockroachDatabase(ModelTestCase): method test_retry_transaction_ok (line 47) | def test_retry_transaction_ok(self): method test_retry_transfer_example (line 61) | def test_retry_transfer_example(self): method test_retry_transfer_example2 (line 97) | def test_retry_transfer_example2(self): method test_retry_transaction_integrityerror (line 126) | def test_retry_transaction_integrityerror(self): method test_run_transaction_helper (line 142) | def test_run_transaction_helper(self): method test_cannot_nest_run_transaction (line 150) | def test_cannot_nest_run_transaction(self): method test_retry_transaction_docs_example (line 160) | def test_retry_transaction_docs_example(self): method test_retry_transaction_decorator (line 173) | def test_retry_transaction_decorator(self): method test_array_field (line 185) | def test_array_field(self): method test_array_field_search (line 203) | def test_array_field_search(self): method test_array_field_index (line 236) | def test_array_field_index(self): method test_uuid_key_field (line 247) | def test_uuid_key_field(self): method test_rowid_field (line 268) | def test_rowid_field(self): method test_readonly_transaction (line 280) | def test_readonly_transaction(self): method test_transaction_priority (line 299) | def test_transaction_priority(self): method test_uuid_key_as_fk (line 314) | def test_uuid_key_as_fk(self): class TestCockroachDatabaseJson (line 340) | class TestCockroachDatabaseJson(BaseBinaryJsonFieldTestCase, ModelTestCa... class KV2 (line 349) | class KV2(TestModel): class Post (line 353) | class Post(TestModel): class PostNote (line 357) | class PostNote(TestModel): class TestCockroachIntegration (line 363) | class TestCockroachIntegration(ModelTestCase): method test_compound_select (line 365) | def test_compound_select(self): method test_primary_key_as_foreign_key (line 376) | def test_primary_key_as_foreign_key(self): class TestEnsureServerVersionSet (line 392) | class TestEnsureServerVersionSet(ModelTestCase): method test_server_version_set (line 396) | def test_server_version_set(self): FILE: tests/cysqlite_ext.py class CyDatabaseTestCase (line 19) | class CyDatabaseTestCase(DatabaseTestCase): method tearDown (line 22) | def tearDown(self): method execute (line 27) | def execute(self, sql, *params): class TestCSqliteHelpers (line 31) | class TestCSqliteHelpers(CyDatabaseTestCase): method test_autocommit (line 32) | def test_autocommit(self): method test_commit_hook (line 39) | def test_commit_hook(self): method test_rollback_hook (line 64) | def test_rollback_hook(self): method test_update_hook (line 87) | def test_update_hook(self): method test_properties (line 119) | def test_properties(self): class TestBackup (line 123) | class TestBackup(CyDatabaseTestCase): method tearDown (line 127) | def tearDown(self): method _populate_test_data (line 133) | def _populate_test_data(self, nrows=100, db=None): method test_backup (line 141) | def test_backup(self): method test_backup_preserve_pagesize (line 152) | def test_backup_preserve_pagesize(self): method test_backup_to_file (line 167) | def test_backup_to_file(self): method test_backup_progress (line 177) | def test_backup_progress(self): method test_backup_progress_error (line 193) | def test_backup_progress_error(self): class DataTypes (line 205) | class DataTypes(cysqlite.TableFunction): method initialize (line 210) | def initialize(self): method iterate (line 222) | def iterate(self, idx): class TestDataTypesTableFunction (line 229) | class TestDataTypesTableFunction(CyDatabaseTestCase): method test_data_types_table_function (line 232) | def test_data_types_table_function(self): FILE: tests/dataset.py class User (line 24) | class User(TestModel): class Note (line 27) | class Note(TestModel): class Category (line 34) | class Category(TestModel): class Bin (line 38) | class Bin(TestModel): class TestDataSet (line 43) | class TestDataSet(ModelTestCase): method setUp (line 48) | def setUp(self): method tearDown (line 55) | def tearDown(self): method test_create_index (line 59) | def test_create_index(self): method test_pass_database (line 67) | def test_pass_database(self): method test_with_views (line 77) | def test_with_views(self): method test_item_apis (line 109) | def test_item_apis(self): method create_users (line 136) | def create_users(self, n=2): method test_special_char_table (line 141) | def test_special_char_table(self): method test_column_preservation (line 150) | def test_column_preservation(self): method test_case_insensitive (line 160) | def test_case_insensitive(self): method test_introspect (line 175) | def test_introspect(self): method test_update_cache (line 192) | def test_update_cache(self): method assertQuery (line 210) | def assertQuery(self, query, expected, sort_key='id'): method test_insert (line 216) | def test_insert(self): method test_update (line 242) | def test_update(self): method test_delete (line 260) | def test_delete(self): method test_find (line 266) | def test_find(self): method test_magic_methods (line 301) | def test_magic_methods(self): method test_foreign_keys (line 317) | def test_foreign_keys(self): method test_transactions (line 364) | def test_transactions(self): method test_export (line 395) | def test_export(self): method test_freeze_thaw_csv_utf8 (line 411) | def test_freeze_thaw_csv_utf8(self): method test_freeze_thaw_json_utf8 (line 414) | def test_freeze_thaw_json_utf8(self): method _test_freeze_thaw_utf8 (line 417) | def _test_freeze_thaw_utf8(self, fmt): method test_freeze_thaw (line 436) | def test_freeze_thaw(self): method test_freeze_thaw_datatypes_json (line 469) | def test_freeze_thaw_datatypes_json(self): method test_freeze_thaw_datatypes_csv (line 511) | def test_freeze_thaw_datatypes_csv(self): method test_table_column_creation (line 550) | def test_table_column_creation(self): method test_table_column_creation_field_col (line 556) | def test_table_column_creation_field_col(self): method test_import_json (line 568) | def test_import_json(self): method test_import_csv (line 617) | def test_import_csv(self): method test_table_thaw (line 665) | def test_table_thaw(self): method test_creating_tables (line 674) | def test_creating_tables(self): FILE: tests/db_tests.py class TestDatabase (line 32) | class TestDatabase(DatabaseTestCase): method test_pragmas (line 35) | def test_pragmas(self): method test_appid_user_version (line 46) | def test_appid_user_version(self): method test_timeout_semantics (line 58) | def test_timeout_semantics(self): method test_pragmas_deferred (line 72) | def test_pragmas_deferred(self): method test_pragmas_as_dict (line 96) | def test_pragmas_as_dict(self): method test_pragmas_permanent (line 113) | def test_pragmas_permanent(self): method test_context_settings (line 125) | def test_context_settings(self): method test_connection_state (line 154) | def test_connection_state(self): method test_db_context_manager (line 162) | def test_db_context_manager(self): method test_connection_initialization (line 180) | def test_connection_initialization(self): method test_connect_semantics (line 195) | def test_connect_semantics(self): method test_execute_sql (line 218) | def test_execute_sql(self): method test_bind_helpers (line 227) | def test_bind_helpers(self): method test_bind_regression (line 256) | def test_bind_regression(self): method test_batch_commit (line 289) | def test_batch_commit(self): method test_server_version (line 319) | def test_server_version(self): method test_explicit_connect (line 341) | def test_explicit_connect(self): class TestThreadSafety (line 349) | class TestThreadSafety(ModelTestCase): method test_multiple_writers (line 358) | def test_multiple_writers(self): method test_multiple_readers (line 372) | def test_multiple_readers(self): method test_mt_general (line 387) | def test_mt_general(self): class TestDeferredDatabase (line 403) | class TestDeferredDatabase(BaseTestCase): method test_deferred_database (line 404) | def test_deferred_database(self): class CatToy (line 431) | class CatToy(TestModel): class Meta (line 434) | class Meta: class TestSchemaNamespace (line 439) | class TestSchemaNamespace(ModelTestCase): method setUp (line 442) | def setUp(self): method tearDown (line 447) | def tearDown(self): method test_schema (line 452) | def test_schema(self): class TestSqliteIsolation (line 459) | class TestSqliteIsolation(ModelTestCase): method test_sqlite_isolation (line 463) | def test_sqlite_isolation(self): class UniqueModel (line 493) | class UniqueModel(TestModel): class IndexedModel (line 497) | class IndexedModel(TestModel): class Meta (line 502) | class Meta: class Note (line 509) | class Note(TestModel): class Meta (line 514) | class Meta: class Person (line 518) | class Person(TestModel): class Meta (line 522) | class Meta: class TestIntrospection (line 528) | class TestIntrospection(ModelTestCase): method test_table_exists (line 531) | def test_table_exists(self): method test_get_tables (line 539) | def test_get_tables(self): method test_get_indexes (line 548) | def test_get_indexes(self): method test_get_columns (line 575) | def test_get_columns(self): method test_get_primary_keys (line 592) | def test_get_primary_keys(self): method test_get_views (line 600) | def test_get_views(self): method test_get_foreign_keys (line 668) | def test_get_foreign_keys(self): class TestSortModels (line 682) | class TestSortModels(BaseTestCase): method test_sort_models (line 683) | def test_sort_models(self): method test_sort_models_multi_fk (line 700) | def test_sort_models_multi_fk(self): class TestDBProxy (line 730) | class TestDBProxy(BaseTestCase): method test_proxy_context_manager (line 731) | def test_proxy_context_manager(self): method test_db_proxy (line 748) | def test_db_proxy(self): method test_proxy_decorator (line 774) | def test_proxy_decorator(self): method test_proxy_bind_ctx_callbacks (line 797) | def test_proxy_bind_ctx_callbacks(self): class Data (line 824) | class Data(TestModel): class Meta (line 828) | class Meta: class TestAttachDatabase (line 832) | class TestAttachDatabase(ModelTestCase): method test_attach (line 836) | def test_attach(self): method test_attach_detach (line 898) | def test_attach_detach(self): method test_sqlite_schema_support (line 916) | def test_sqlite_schema_support(self): class TestDatabaseConnection (line 932) | class TestDatabaseConnection(DatabaseTestCase): method test_is_connection_usable (line 933) | def test_is_connection_usable(self): method test_is_connection_usable_pg (line 944) | def test_is_connection_usable_pg(self): class TestExceptionWrapper (line 963) | class TestExceptionWrapper(ModelTestCase): method test_exception_wrapper (line 967) | def test_exception_wrapper(self): class TestModelPropertyHelper (line 978) | class TestModelPropertyHelper(BaseTestCase): method test_model_property (line 979) | def test_model_property(self): method test_model_property_on_proxy (line 987) | def test_model_property_on_proxy(self): class TestChunkedUtility (line 999) | class TestChunkedUtility(BaseTestCase): method test_chunked_exact_divisor (line 1000) | def test_chunked_exact_divisor(self): method test_chunked_with_remainder (line 1004) | def test_chunked_with_remainder(self): method test_chunked_single_element (line 1008) | def test_chunked_single_element(self): method test_chunked_empty (line 1012) | def test_chunked_empty(self): method test_chunked_size_one (line 1016) | def test_chunked_size_one(self): method test_chunked_generator_input (line 1020) | def test_chunked_generator_input(self): FILE: tests/db_url.py class TestDBUrl (line 8) | class TestDBUrl(BaseTestCase): method test_db_url_parse (line 9) | def test_db_url_parse(self): method test_db_url_no_unquoting (line 32) | def test_db_url_no_unquoting(self): method test_db_url_quoted_password (line 41) | def test_db_url_quoted_password(self): method test_db_url_quoted_user (line 49) | def test_db_url_quoted_user(self): method test_db_url (line 57) | def test_db_url(self): method test_bad_scheme (line 83) | def test_bad_scheme(self): FILE: tests/expressions.py class Person (line 10) | class Person(TestModel): class BaseNamesTest (line 14) | class BaseNamesTest(ModelTestCase): method assertNames (line 17) | def assertNames(self, exp, x): class TestRegexp (line 23) | class TestRegexp(BaseNamesTest): method test_regexp_iregexp (line 25) | def test_regexp_iregexp(self): class TestContains (line 34) | class TestContains(BaseNamesTest): method test_contains_startswith_endswith (line 35) | def test_contains_startswith_endswith(self): class UpperField (line 48) | class UpperField(TextField): method db_value (line 49) | def db_value(self, value): class UpperModel (line 53) | class UpperModel(TestModel): class TestValueConversion (line 57) | class TestValueConversion(ModelTestCase): method test_value_conversion (line 68) | def test_value_conversion(self): method test_value_conversion_mixed (line 103) | def test_value_conversion_mixed(self): method test_value_conversion_query (line 141) | def test_value_conversion_query(self): method test_having_clause (line 167) | def test_having_clause(self): FILE: tests/extra_fields.py class Comp (line 10) | class Comp(TestModel): class Pickled (line 15) | class Pickled(TestModel): class TestCompressedField (line 20) | class TestCompressedField(ModelTestCase): method test_compressed_field (line 23) | def test_compressed_field(self): class TestPickleField (line 44) | class TestPickleField(ModelTestCase): method test_pickle_field (line 47) | def test_pickle_field(self): FILE: tests/fields.py class IntModel (line 31) | class IntModel(TestModel): class TestCoerce (line 36) | class TestCoerce(ModelTestCase): method test_coerce (line 39) | def test_coerce(self): class DefaultValues (line 46) | class DefaultValues(TestModel): class TestTextField (line 51) | class TestTextField(TextField): method first_char (line 52) | def first_char(self): class PhoneBook (line 56) | class PhoneBook(TestModel): class Bits (line 60) | class Bits(TestModel): class TestDefaultValues (line 73) | class TestDefaultValues(ModelTestCase): method test_default_values (line 76) | def test_default_values(self): method test_defaults_create (line 86) | def test_defaults_create(self): class TestNullConstraint (line 96) | class TestNullConstraint(ModelTestCase): method test_null (line 99) | def test_null(self): method test_empty_value (line 104) | def test_empty_value(self): class TestIntegerField (line 110) | class TestIntegerField(ModelTestCase): method test_integer_field (line 113) | def test_integer_field(self): class FloatModel (line 124) | class FloatModel(TestModel): class TestFloatField (line 129) | class TestFloatField(ModelTestCase): method test_float_field (line 132) | def test_float_field(self): class DecimalModel (line 141) | class DecimalModel(TestModel): class TestDecimalField (line 147) | class TestDecimalField(ModelTestCase): method test_decimal_field (line 150) | def test_decimal_field(self): method test_decimal_rounding (line 157) | def test_decimal_rounding(self): class BoolModel (line 164) | class BoolModel(TestModel): class TestBooleanField (line 169) | class TestBooleanField(ModelTestCase): method test_boolean_field (line 172) | def test_boolean_field(self): class DateModel (line 184) | class DateModel(TestModel): class CustomDateTimeModel (line 190) | class CustomDateTimeModel(TestModel): class TestDateFields (line 196) | class TestDateFields(ModelTestCase): method test_date_time_custom_format (line 200) | def test_date_time_custom_format(self): method test_date_fields (line 206) | def test_date_fields(self): method test_extract_parts (line 230) | def test_extract_parts(self): method test_truncate_date (line 256) | def test_truncate_date(self): method test_to_timestamp (line 285) | def test_to_timestamp(self): method test_distinct_date_part (line 312) | def test_distinct_date_part(self): class U2 (line 325) | class U2(TestModel): class T2 (line 329) | class T2(TestModel): class TestForeignKeyField (line 334) | class TestForeignKeyField(ModelTestCase): method test_set_fk (line 337) | def test_set_fk(self): method test_follow_attributes (line 356) | def test_follow_attributes(self): method test_disable_backref (line 372) | def test_disable_backref(self): method test_on_delete_behavior (line 387) | def test_on_delete_behavior(self): class M1 (line 411) | class M1(TestModel): class M2 (line 416) | class M2(TestModel): class TestDeferredForeignKey (line 424) | class TestDeferredForeignKey(ModelTestCase): method test_deferred_foreign_key (line 427) | def test_deferred_foreign_key(self): class TestDeferredForeignKeyResolution (line 439) | class TestDeferredForeignKeyResolution(ModelTestCase): method test_unresolved_deferred_fk (line 440) | def test_unresolved_deferred_fk(self): method test_deferred_foreign_key_resolution (line 448) | def test_deferred_foreign_key_resolution(self): class Composite (line 501) | class Composite(TestModel): class Meta (line 506) | class Meta: class TestCompositePrimaryKeyField (line 510) | class TestCompositePrimaryKeyField(ModelTestCase): method test_composite_primary_key (line 513) | def test_composite_primary_key(self): class TestFieldFunction (line 517) | class TestFieldFunction(ModelTestCase): method setUp (line 520) | def setUp(self): method _test_field_function (line 526) | def _test_field_function(self, PB): method test_field_function (line 539) | def test_field_function(self): method test_field_function_alias (line 542) | def test_field_function_alias(self): class IPModel (line 546) | class IPModel(TestModel): class TestIPField (line 551) | class TestIPField(ModelTestCase): method test_ip_field (line 554) | def test_ip_field(self): class TestBitFields (line 563) | class TestBitFields(ModelTestCase): method test_bit_field_update (line 566) | def test_bit_field_update(self): method test_bit_field_auto_flag (line 597) | def test_bit_field_auto_flag(self): method test_bit_field_instance_flags (line 618) | def test_bit_field_instance_flags(self): method test_bit_field (line 638) | def test_bit_field(self): method test_bigbit_field_instance_data (line 663) | def test_bigbit_field_instance_data(self): method test_bigbit_zero_idx (line 680) | def test_bigbit_zero_idx(self): method test_bigbit_item_methods (line 691) | def test_bigbit_item_methods(self): method test_bigbit_set_clear (line 707) | def test_bigbit_set_clear(self): method test_bigbit_field (line 716) | def test_bigbit_field(self): method test_bigbit_field_bitwise (line 730) | def test_bigbit_field_bitwise(self): method test_bigbit_field_bulk_create (line 760) | def test_bigbit_field_bulk_create(self): method test_bigbit_field_bulk_update (line 771) | def test_bigbit_field_bulk_update(self): class BlobModel (line 785) | class BlobModel(TestModel): class TestBlobField (line 789) | class TestBlobField(ModelTestCase): method test_blob_field (line 792) | def test_blob_field(self): method test_blob_on_proxy (line 804) | def test_blob_on_proxy(self): method test_blob_db_hook (line 815) | def test_blob_db_hook(self): class BigModel (line 841) | class BigModel(TestModel): class TestBigAutoField (line 846) | class TestBigAutoField(ModelTestCase): method test_big_auto_field (line 849) | def test_big_auto_field(self): class Item (line 861) | class Item(TestModel): class Bare (line 866) | class Bare(TestModel): class TestFieldValueHandling (line 871) | class TestFieldValueHandling(ModelTestCase): method test_int_float_multi (line 875) | def test_int_float_multi(self): method test_explicit_cast (line 919) | def test_explicit_cast(self): method test_bare_model_adapt (line 946) | def test_bare_model_adapt(self): class UUIDModel (line 964) | class UUIDModel(TestModel): class TestUUIDField (line 969) | class TestUUIDField(ModelTestCase): method test_uuid_field (line 972) | def test_uuid_field(self): method test_binary_uuid_field (line 997) | def test_binary_uuid_field(self): class UU1 (line 1023) | class UU1(TestModel): class UU2 (line 1027) | class UU2(TestModel): class TestForeignKeyUUIDField (line 1033) | class TestForeignKeyUUIDField(ModelTestCase): method test_bulk_insert (line 1036) | def test_bulk_insert(self): class TSModel (line 1058) | class TSModel(TestModel): class TSR (line 1065) | class TSR(TestModel): class TestTimestampField (line 1072) | class TestTimestampField(ModelTestCase): method test_timestamp_field_resolutions (line 1076) | def test_timestamp_field_resolutions(self): method test_timestamp_field (line 1087) | def test_timestamp_field(self): method test_timestamp_field_math (line 1102) | def test_timestamp_field_math(self): method test_timestamp_field_value_as_ts (line 1120) | def test_timestamp_field_value_as_ts(self): method test_timestamp_utc_vs_localtime (line 1141) | def test_timestamp_utc_vs_localtime(self): method test_timestamp_field_parts (line 1164) | def test_timestamp_field_parts(self): method test_timestamp_field_from_ts (line 1194) | def test_timestamp_field_from_ts(self): method test_invalid_resolution (line 1221) | def test_invalid_resolution(self): class ListField (line 1227) | class ListField(TextField): method db_value (line 1228) | def db_value(self, value): method python_value (line 1231) | def python_value(self, value): class Todo (line 1235) | class Todo(TestModel): class TestCustomField (line 1240) | class TestCustomField(ModelTestCase): method test_custom_field (line 1243) | def test_custom_field(self): class UpperField (line 1260) | class UpperField(TextField): method db_value (line 1261) | def db_value(self, value): class UpperModel (line 1265) | class UpperModel(TestModel): class TestSQLFunctionDBValue (line 1269) | class TestSQLFunctionDBValue(ModelTestCase): method test_sql_function_db_value (line 1273) | def test_sql_function_db_value(self): class Schedule (line 1296) | class Schedule(TestModel): class Task (line 1299) | class Task(TestModel): class TestDateTimeMath (line 1305) | class TestDateTimeMath(ModelTestCase): method setUp (line 1315) | def setUp(self): method _do_test_date_time_math (line 1326) | def _do_test_date_time_math(self, next_occurrence_expression): method test_date_time_math_pg (line 1338) | def test_date_time_math_pg(self): method test_date_time_math_sqlite (line 1344) | def test_date_time_math_sqlite(self): method test_date_time_math_mysql (line 1352) | def test_date_time_math_mysql(self): class NQ (line 1358) | class NQ(TestModel): class NQItem (line 1361) | class NQItem(TestModel): class TestForeignKeyLazyLoad (line 1369) | class TestForeignKeyLazyLoad(ModelTestCase): method setUp (line 1372) | def setUp(self): method test_doesnotexist_lazy_load (line 1381) | def test_doesnotexist_lazy_load(self): method test_foreign_key_lazy_load (line 1394) | def test_foreign_key_lazy_load(self): method test_fk_lazy_load_related_instance (line 1420) | def test_fk_lazy_load_related_instance(self): method test_fk_lazy_select_related (line 1431) | def test_fk_lazy_select_related(self): class SM (line 1456) | class SM(TestModel): class TestStringFields (line 1461) | class TestStringFields(ModelTestCase): method test_string_fields (line 1464) | def test_string_fields(self): class InvalidTypes (line 1492) | class InvalidTypes(TestModel): class TestSqliteInvalidDataTypes (line 1498) | class TestSqliteInvalidDataTypes(ModelTestCase): method test_invalid_data_types (line 1502) | def test_invalid_data_types(self): class DblSI (line 1514) | class DblSI(TestModel): class TestDoubleSmallInt (line 1519) | class TestDoubleSmallInt(ModelTestCase): method test_double_round_trip (line 1523) | def test_double_round_trip(self): method test_small_int_round_trip (line 1528) | def test_small_int_round_trip(self): method test_coercion (line 1537) | def test_coercion(self): class FC (line 1549) | class FC(TestModel): class TestFixedCharFieldIntegration (line 1554) | class TestFixedCharFieldIntegration(ModelTestCase): method test_fixed_char_truncates (line 1558) | def test_fixed_char_truncates(self): class VF (line 1565) | class VF(TestModel): class TestVirtualFieldBehavior (line 1570) | class TestVirtualFieldBehavior(BaseTestCase): method test_virtual_field_not_in_columns (line 1571) | def test_virtual_field_not_in_columns(self): method test_virtual_field_db_value (line 1583) | def test_virtual_field_db_value(self): FILE: tests/hybrid.py class Interval (line 10) | class Interval(TestModel): method length (line 15) | def length(self): method contains (line 19) | def contains(self, point): method radius (line 23) | def radius(self): method radius (line 27) | def radius(cls): class Person (line 31) | class Person(TestModel): method full_name (line 36) | def full_name(self): class SubPerson (line 39) | class SubPerson(Person): class TestHybridProperties (line 43) | class TestHybridProperties(ModelTestCase): method setUp (line 47) | def setUp(self): method test_hybrid_property (line 57) | def test_hybrid_property(self): method test_hybrid_method (line 70) | def test_hybrid_method(self): method test_expression (line 83) | def test_expression(self): method test_string_fields (line 96) | def test_string_fields(self): method test_hybrid_model_alias (line 107) | def test_hybrid_model_alias(self): method test_hybrid_subclass_model_alias (line 117) | def test_hybrid_subclass_model_alias(self): class Order (line 127) | class Order(TestModel): method quantity (line 131) | def quantity(self): method quantity (line 135) | def quantity(cls): class Item (line 138) | class Item(TestModel): class TestHybridWithRelationship (line 143) | class TestHybridWithRelationship(ModelTestCase): method test_hybrid_with_relationship (line 147) | def test_hybrid_with_relationship(self): FILE: tests/keys.py class Package (line 12) | class Package(TestModel): class PackageItem (line 16) | class PackageItem(TestModel): class Manufacturer (line 21) | class Manufacturer(TestModel): class Component (line 25) | class Component(TestModel): class Computer (line 30) | class Computer(TestModel): class User (line 36) | class User(TestModel): class Meta (line 39) | class Meta: class Relationship (line 43) | class Relationship(TestModel): class Note (line 48) | class Note(TestModel): class CompositeKeyModel (line 53) | class CompositeKeyModel(TestModel): class Meta (line 58) | class Meta: class UserThing (line 62) | class UserThing(TestModel): class Meta (line 66) | class Meta: class Post (line 70) | class Post(TestModel): class Tag (line 74) | class Tag(TestModel): class TagPostThrough (line 78) | class TagPostThrough(TestModel): class Meta (line 82) | class Meta: class TagPostThroughAlt (line 86) | class TagPostThroughAlt(TestModel): class TestForeignKeyToNonPrimaryKey (line 91) | class TestForeignKeyToNonPrimaryKey(ModelTestCase): method setUp (line 94) | def setUp(self): method test_fk_resolution (line 104) | def test_fk_resolution(self): method test_select_generation (line 109) | def test_select_generation(self): class TestMultipleForeignKey (line 116) | class TestMultipleForeignKey(ModelTestCase): method setUp (line 123) | def setUp(self): method test_multi_join (line 138) | def test_multi_join(self): class TestMultipleForeignKeysJoining (line 198) | class TestMultipleForeignKeysJoining(ModelTestCase): method test_multiple_fks (line 201) | def test_multiple_fks(self): class TestCompositePrimaryKey (line 248) | class TestCompositePrimaryKey(ModelTestCase): method setUp (line 251) | def setUp(self): method test_create_table_query (line 261) | def test_create_table_query(self): method test_get_set_id (line 273) | def test_get_set_id(self): method test_querying (line 299) | def test_querying(self): method test_composite_key_model (line 314) | def test_composite_key_model(self): method test_count_composite_key (line 349) | def test_count_composite_key(self): method test_delete_instance (line 367) | def test_delete_instance(self): method test_composite_key_inheritance (line 380) | def test_composite_key_inheritance(self): class TestForeignKeyConstraints (line 406) | class TestForeignKeyConstraints(ModelTestCase): method setUp (line 409) | def setUp(self): method tearDown (line 413) | def tearDown(self): method set_foreign_key_pragma (line 417) | def set_foreign_key_pragma(self, is_enabled): method test_constraint_exists (line 421) | def test_constraint_exists(self): method test_disable_constraint (line 428) | def test_disable_constraint(self): class FK_A (line 433) | class FK_A(TestModel): class FK_B (line 436) | class FK_B(TestModel): class TestFKtoNonPKField (line 440) | class TestFKtoNonPKField(ModelTestCase): method test_fk_to_non_pk_field (line 443) | def test_fk_to_non_pk_field(self): method test_fk_to_non_pk_insert_update (line 458) | def test_fk_to_non_pk_insert_update(self): class TestDeferredForeignKeyIntegration (line 485) | class TestDeferredForeignKeyIntegration(ModelTestCase): method test_deferred_fk_simple (line 488) | def test_deferred_fk_simple(self): method test_deferred_fk_as_pk (line 511) | def test_deferred_fk_as_pk(self): FILE: tests/kv.py class TestKeyValue (line 8) | class TestKeyValue(DatabaseTestCase): method setUp (line 9) | def setUp(self): method tearDown (line 13) | def tearDown(self): method create_kv (line 18) | def create_kv(self, **kwargs): method test_basic_apis (line 23) | def test_basic_apis(self): method test_update (line 66) | def test_update(self): method test_expressions (line 92) | def test_expressions(self): method test_integer_keys (line 117) | def test_integer_keys(self): FILE: tests/manytomany.py class User (line 11) | class User(TestModel): class Note (line 14) | class Note(TestModel): class AltNote (line 22) | class AltNote(TestModel): class AltThroughModel (line 26) | class AltThroughModel(TestModel): class Meta (line 30) | class Meta: class Student (line 35) | class Student(TestModel): class Course (line 40) | class Course(TestModel): class CourseStudent2 (line 47) | class CourseStudent2(TestModel): class Color (line 54) | class Color(TestModel): class Logo (line 59) | class Logo(TestModel): class LogoColor (line 63) | class LogoColor(TestModel): class TestManyToManyFKtoNonPK (line 70) | class TestManyToManyFKtoNonPK(ModelTestCase): method test_manytomany_fk_to_non_pk (line 74) | def test_manytomany_fk_to_non_pk(self): class TestManyToManyBackrefBehavior (line 140) | class TestManyToManyBackrefBehavior(ModelTestCase): method setUp (line 144) | def setUp(self): method test_manytomanyfield_disabled_backref (line 156) | def test_manytomanyfield_disabled_backref(self): method test_through_model_disabled_backrefs (line 168) | def test_through_model_disabled_backrefs(self): class TestManyToManyInheritance (line 184) | class TestManyToManyInheritance(ModelTestCase): method test_manytomany_inheritance (line 185) | def test_manytomany_inheritance(self): class TestManyToMany (line 209) | class TestManyToMany(ModelTestCase): method setUp (line 220) | def setUp(self): method test_through_model (line 227) | def test_through_model(self): method _set_data (line 240) | def _set_data(self): method assertNotes (line 248) | def assertNotes(self, query, expected): method assertUsers (line 253) | def assertUsers(self, query, expected): method test_accessor_query (line 257) | def test_accessor_query(self): method test_prefetch_notes (line 278) | def test_prefetch_notes(self): method test_prefetch_users (line 295) | def test_prefetch_users(self): method test_query_filtering (line 314) | def test_query_filtering(self): method test_set_value (line 322) | def test_set_value(self): method test_set_query (line 339) | def test_set_query(self): method test_add (line 346) | def test_add(self): method test_add_by_pk (line 379) | def test_add_by_pk(self): method test_unique (line 388) | def test_unique(self): method test_remove (line 402) | def test_remove(self): method test_remove_by_id (line 429) | def test_remove_by_id(self): method test_clear (line 441) | def test_clear(self): method test_manual_through (line 468) | def test_manual_through(self): class Person (line 546) | class Person(TestModel): class Account (line 549) | class Account(TestModel): class AccountList (line 552) | class AccountList(TestModel): class TestForeignKeyPrimaryKeyManyToMany (line 559) | class TestForeignKeyPrimaryKeyManyToMany(ModelTestCase): method setUp (line 569) | def setUp(self): method account_for (line 581) | def account_for(self, name): method assertLists (line 584) | def assertLists(self, l1, l2): method test_pk_is_fk (line 587) | def test_pk_is_fk(self): method test_empty (line 602) | def test_empty(self): class Permission (line 607) | class Permission(TestModel): class Visitor (line 612) | class Visitor(TestModel): class DeniedThrough (line 617) | class DeniedThrough(TestModel): class TestMultipleManyToManySameTables (line 624) | class TestMultipleManyToManySameTables(ModelTestCase): method test_multiple_manytomany_same_tables (line 629) | def test_multiple_manytomany_same_tables(self): FILE: tests/migrations.py class Tag (line 33) | class Tag(TestModel): class Person (line 36) | class Person(TestModel): class User (line 41) | class User(TestModel): class Meta (line 45) | class Meta: class Page (line 48) | class Page(TestModel): class Session (line 52) | class Session(TestModel): class IndexModel (line 56) | class IndexModel(TestModel): class Meta (line 61) | class Meta: class Category (line 66) | class Category(TestModel): class TestSchemaMigration (line 70) | class TestSchemaMigration(ModelTestCase): method setUp (line 82) | def setUp(self): method tearDown (line 86) | def tearDown(self): method test_add_table_constraint (line 93) | def test_add_table_constraint(self): method test_add_unique (line 113) | def test_add_unique(self): method test_drop_table_constraint (line 131) | def test_drop_table_constraint(self): method test_add_column (line 153) | def test_add_column(self): method test_add_column_constraint (line 208) | def test_add_column_constraint(self): method _create_people (line 237) | def _create_people(self): method get_column_names (line 241) | def get_column_names(self, tbl): method test_drop_column (line 245) | def test_drop_column(self, legacy=False): method test_drop_column_sqlite_legacy (line 267) | def test_drop_column_sqlite_legacy(self): method test_rename_column (line 270) | def test_rename_column(self, legacy=False): method test_rename_column_sqlite_legacy (line 298) | def test_rename_column_sqlite_legacy(self): method test_rename_gh380 (line 301) | def test_rename_gh380(self, legacy=False): method test_rename_gh380_sqlite_legacy (line 332) | def test_rename_gh380_sqlite_legacy(self): method test_add_default_drop_default (line 336) | def test_add_default_drop_default(self): method test_add_not_null (line 359) | def test_add_not_null(self): method test_drop_not_null (line 388) | def test_drop_not_null(self): method test_modify_not_null_foreign_key (line 402) | def test_modify_not_null_foreign_key(self): method test_rename_table (line 435) | def test_rename_table(self): method test_add_index (line 465) | def test_add_index(self): method test_add_unique_column (line 475) | def test_add_unique_column(self): method test_drop_index (line 496) | def test_drop_index(self): method test_add_and_remove (line 512) | def test_add_and_remove(self): method test_multiple_operations (line 523) | def test_multiple_operations(self): method test_add_foreign_key (line 575) | def test_add_foreign_key(self): method test_drop_foreign_key (line 608) | def test_drop_foreign_key(self): method test_rename_foreign_key (line 617) | def test_rename_foreign_key(self): method test_rename_unique_foreign_key (line 631) | def test_rename_unique_foreign_key(self): method test_add_column_with_index_type (line 647) | def test_add_column_with_index_type(self): method test_alter_column_type (line 660) | def test_alter_column_type(self): method test_valid_column_required (line 692) | def test_valid_column_required(self): method test_table_case_insensitive (line 705) | def test_table_case_insensitive(self): method test_add_column_indexed_table (line 723) | def test_add_column_indexed_table(self): method test_rename_column_to_table_name (line 741) | def test_rename_column_to_table_name(self): method test_add_fk_with_constraints (line 767) | def test_add_fk_with_constraints(self): method test_index_preservation (line 785) | def test_index_preservation(self): method test_modify_fk_constraint (line 843) | def test_modify_fk_constraint(self): method test_make_index_name (line 896) | def test_make_index_name(self): method test_make_index_name_long (line 899) | def test_make_index_name_long(self): class BadNames (line 910) | class BadNames(TestModel): class Meta (line 915) | class Meta: class HasChecks (line 921) | class HasChecks(TestModel): class Meta (line 924) | class Meta: class TestSqliteColumnNameRegression (line 930) | class TestSqliteColumnNameRegression(ModelTestCase): method test_sqlite_check_constraints (line 934) | def test_sqlite_check_constraints(self): method test_sqlite_column_name_constraint_regression (line 959) | def test_sqlite_column_name_constraint_regression(self): FILE: tests/model_save.py class T1 (line 8) | class T1(TestModel): class T2 (line 12) | class T2(TestModel): class T3 (line 16) | class T3(TestModel): class T4 (line 20) | class T4(TestModel): class Meta (line 24) | class Meta: class T5 (line 27) | class T5(TestModel): class TestPrimaryKeySaveHandling (line 31) | class TestPrimaryKeySaveHandling(ModelTestCase): method test_auto_field (line 34) | def test_auto_field(self): method test_server_default_pk (line 68) | def test_server_default_pk(self): method test_integer_field_pk (line 92) | def test_integer_field_pk(self): method test_composite_pk (line 109) | def test_composite_pk(self): method test_returning_object (line 128) | def test_returning_object(self): class TestSaveNoData (line 135) | class TestSaveNoData(ModelTestCase): method test_save_no_data (line 138) | def test_save_no_data(self): method test_save_no_data2 (line 154) | def test_save_no_data2(self): method test_save_no_data3 (line 163) | def test_save_no_data3(self): method test_save_only_no_data (line 167) | def test_save_only_no_data(self): FILE: tests/model_sql.py class CKM (line 19) | class CKM(TestModel): class Meta (line 23) | class Meta: class TestModelSQL (line 27) | class TestModelSQL(ModelDatabaseTestCase): method test_select (line 31) | def test_select(self): method test_reselect (line 47) | def test_reselect(self): method test_select_extend (line 65) | def test_select_extend(self): method test_selected_columns (line 74) | def test_selected_columns(self): method test_where_coerce (line 98) | def test_where_coerce(self): method test_group_by (line 114) | def test_group_by(self): method test_group_by_extend (line 126) | def test_group_by_extend(self): method test_order_by (line 138) | def test_order_by(self): method test_order_by_extend (line 146) | def test_order_by_extend(self): method test_paginate (line 155) | def test_paginate(self): method test_subquery_correction (line 168) | def test_subquery_correction(self): method test_value_flattening (line 179) | def test_value_flattening(self): method test_model_select_from (line 196) | def test_model_select_from(self): method test_join_ctx (line 207) | def test_join_ctx(self): method test_model_alias (line 234) | def test_model_alias(self): method test_model_alias_with_schema (line 246) | def test_model_alias_with_schema(self): method test_model_alias_join_with_schema (line 262) | def test_model_alias_join_with_schema(self): method test_filter_simple (line 278) | def test_filter_simple(self): method test_filter_expressions (line 302) | def test_filter_expressions(self): method test_filter_join (line 313) | def test_filter_join(self): method test_filter_with_or_across_joins (line 330) | def test_filter_with_or_across_joins(self): method test_filter_join_combine_models (line 343) | def test_filter_join_combine_models(self): method test_mix_filter_methods (line 354) | def test_mix_filter_methods(self): method test_join_parent (line 369) | def test_join_parent(self): method test_cross_join (line 382) | def test_cross_join(self): method test_join_expr (line 397) | def test_join_expr(self): method test_join_multiple_fks (line 425) | def test_join_multiple_fks(self): method test_raw (line 465) | def test_raw(self): method test_insert (line 475) | def test_insert(self): method test_replace (line 496) | def test_replace(self): method test_insert_many (line 504) | def test_insert_many(self): method test_insert_many_defaults (line 524) | def test_insert_many_defaults(self): method test_insert_many_defaults_nulls (line 537) | def test_insert_many_defaults_nulls(self): method test_insert_many_list_with_fields (line 552) | def test_insert_many_list_with_fields(self): method test_insert_many_infer_fields (line 565) | def test_insert_many_infer_fields(self): method test_insert_query (line 580) | def test_insert_query(self): method test_insert_returning (line 596) | def test_insert_returning(self): method test_insert_get_field_values (line 632) | def test_insert_get_field_values(self): method test_insert_many_get_field_values (line 676) | def test_insert_many_get_field_values(self): method test_insert_many_dict_and_list (line 725) | def test_insert_many_dict_and_list(self): method test_insert_modelalias (line 754) | def test_insert_modelalias(self): method test_update (line 761) | def test_update(self): method test_update_subquery (line 785) | def test_update_subquery(self): method test_update_from (line 810) | def test_update_from(self): method test_update_from_qualnames (line 840) | def test_update_from_qualnames(self): method test_update_from_subselect (line 852) | def test_update_from_subselect(self): method test_delete (line 866) | def test_delete(self): method test_delete_recursive (line 880) | def test_delete_recursive(self): method test_aliases (line 912) | def test_aliases(self): method test_schema (line 939) | def test_schema(self): class TestOnConflictSQL (line 953) | class TestOnConflictSQL(ModelDatabaseTestCase): method test_atomic_update (line 956) | def test_atomic_update(self): method test_on_conflict_do_nothing (line 967) | def test_on_conflict_do_nothing(self): method test_update_where_clause (line 982) | def test_update_where_clause(self): method test_conflict_target_constraint_where (line 995) | def test_conflict_target_constraint_where(self): method test_preserve_and_update (line 1012) | def test_preserve_and_update(self): method test_preserve_with_where (line 1027) | def test_preserve_with_where(self): method test_on_conflict_named_constraint (line 1043) | def test_on_conflict_named_constraint(self): class TestStringsForFieldsa (line 1056) | class TestStringsForFieldsa(ModelDatabaseTestCase): method test_insert (line 1060) | def test_insert(self): method test_insert_many (line 1068) | def test_insert_many(self): method test_update (line 1078) | def test_update(self): class CompoundTestModel (line 1089) | class CompoundTestModel(Model): class Meta (line 1090) | class Meta: class Alpha (line 1093) | class Alpha(CompoundTestModel): class Beta (line 1096) | class Beta(CompoundTestModel): class Gamma (line 1100) | class Gamma(CompoundTestModel): class TestModelCompoundSelect (line 1105) | class TestModelCompoundSelect(BaseTestCase): method test_unions (line 1106) | def test_unions(self): method test_union_same_model (line 1120) | def test_union_same_model(self): method test_where (line 1136) | def test_where(self): method test_limit (line 1171) | def test_limit(self): method test_union_from (line 1182) | def test_union_from(self): method test_parentheses (line 1208) | def test_parentheses(self): method test_where_in (line 1219) | def test_where_in(self): class TestModelIndex (line 1232) | class TestModelIndex(BaseTestCase): method test_model_index (line 1235) | def test_model_index(self): method test_unique_index_nulls (line 1259) | def test_unique_index_nulls(self): class TestModelArgument (line 1286) | class TestModelArgument(BaseTestCase): method test_model_as_argument (line 1289) | def test_model_as_argument(self): FILE: tests/models.py class Color (line 40) | class Color(TestModel): class Post (line 45) | class Post(TestModel): class PostNote (line 51) | class PostNote(TestModel): class Point (line 56) | class Point(TestModel): class Meta (line 59) | class Meta: class CPK (line 63) | class CPK(TestModel): class Meta (line 67) | class Meta: class City (line 71) | class City(TestModel): class Venue (line 74) | class Venue(TestModel): class Event (line 79) | class Event(TestModel): class TestModelAPIs (line 84) | class TestModelAPIs(ModelTestCase): method add_user (line 85) | def add_user(self, username): method add_tweets (line 88) | def add_tweets(self, user, *tweets): method test_no_primary_key (line 95) | def test_no_primary_key(self): method test_pk_is_fk (line 104) | def test_pk_is_fk(self): method test_assertQueryCount (line 130) | def test_assertQueryCount(self): method test_column_field_translation (line 142) | def test_column_field_translation(self): method test_insert_many (line 159) | def test_insert_many(self): method test_insert_many_defaults_nullable (line 170) | def test_insert_many_defaults_nullable(self): method test_create (line 189) | def test_create(self): method test_bulk_create (line 205) | def test_bulk_create(self): method test_bulk_create_empty (line 221) | def test_bulk_create_empty(self): method test_bulk_create_batching (line 226) | def test_bulk_create_batching(self): method test_bulk_create_error (line 240) | def test_bulk_create_error(self): method test_bulk_create_composite_key (line 250) | def test_bulk_create_composite_key(self): method test_bulk_update (line 262) | def test_bulk_update(self): method test_bulk_update_foreign_key (line 301) | def test_bulk_update_foreign_key(self): method test_bulk_update_integrityerror (line 333) | def test_bulk_update_integrityerror(self): method test_bulk_update_apply_dbvalue (line 368) | def test_bulk_update_apply_dbvalue(self): method test_bulk_update_cte (line 389) | def test_bulk_update_cte(self): method test_insert_rowcount (line 415) | def test_insert_rowcount(self): method test_replace_rowcount (line 442) | def test_replace_rowcount(self): method test_get_shortcut (line 460) | def test_get_shortcut(self): method test_get_with_alias (line 498) | def test_get_with_alias(self): method test_get_or_none (line 510) | def test_get_or_none(self): method test_model_select_get_or_none (line 517) | def test_model_select_get_or_none(self): method test_get_by_id (line 525) | def test_get_by_id(self): method test_get_set_item (line 539) | def test_get_set_item(self): method test_get_or_create (line 555) | def test_get_or_create(self): method test_get_or_create_self_referential_fk (line 563) | def test_get_or_create_self_referential_fk(self): method test_get_or_create_defaults (line 571) | def test_get_or_create_defaults(self): method test_save (line 591) | def test_save(self): method test_save_only (line 619) | def test_save_only(self): method test_save_force (line 643) | def test_save_force(self): method test_populate_unsaved_relations (line 670) | def test_populate_unsaved_relations(self): method test_model_select (line 685) | def test_model_select(self): method test_distinct_on (line 715) | def test_distinct_on(self): method test_join_two_fks (line 729) | def test_join_two_fks(self): method test_join_issue_1482 (line 772) | def test_join_issue_1482(self): method test_join_empty_intermediate_model (line 784) | def test_join_empty_intermediate_model(self): method test_join_empty_relations (line 813) | def test_join_empty_relations(self): method test_join_same_model_twice (line 864) | def test_join_same_model_twice(self): method test_join_to_dict (line 893) | def test_join_to_dict(self): method test_peek (line 919) | def test_peek(self): method test_first (line 930) | def test_first(self): method test_multi_join (line 941) | def test_multi_join(self): method _create_user_tweets (line 991) | def _create_user_tweets(self): method test_join_subquery (line 1005) | def test_join_subquery(self): method test_join_subquery_2 (line 1048) | def test_join_subquery_2(self): method test_join_subquery_cte (line 1079) | def test_join_subquery_cte(self): method test_subquery_emulate_window (line 1107) | def test_subquery_emulate_window(self): method test_subquery_alias_selection (line 1156) | def test_subquery_alias_selection(self): method test_join_on_valueslist (line 1181) | def test_join_on_valueslist(self): method test_multi_update (line 1195) | def test_multi_update(self): method test_insert_query_value (line 1215) | def test_insert_query_value(self): method test_compound_select (line 1225) | def test_compound_select(self): method test_union_column_resolution (line 1258) | def test_union_column_resolution(self): method test_compound_select_as_subquery (line 1314) | def test_compound_select_as_subquery(self): method test_union_with_join (line 1342) | def test_union_with_join(self): method test_union_cte (line 1374) | def test_union_cte(self): method test_self_referential_fk (line 1392) | def test_self_referential_fk(self): method test_empty_joined_instance (line 1416) | def test_empty_joined_instance(self): method test_from_multi_table (line 1434) | def test_from_multi_table(self): method test_subquery_in_select_expression (line 1454) | def test_subquery_in_select_expression(self): method test_filtering (line 1479) | def test_filtering(self): method test_deferred_fk (line 1496) | def test_deferred_fk(self): method test_deferred_fk_dependency_graph (line 1510) | def test_deferred_fk_dependency_graph(self): method test_table_schema (line 1518) | def test_table_schema(self): method test_noop (line 1535) | def test_noop(self): method test_iteration (line 1540) | def test_iteration(self): method test_iterator (line 1551) | def test_iterator(self): method test_select_count (line 1564) | def test_select_count(self): method test_batch_commit (line 1575) | def test_batch_commit(self): class TestRaw (line 1597) | class TestRaw(ModelTestCase): method test_raw (line 1601) | def test_raw(self): method test_raw_iterator (line 1614) | def test_raw_iterator(self): class TestDeleteInstance (line 1628) | class TestDeleteInstance(ModelTestCase): method setUp (line 1632) | def setUp(self): method test_delete_instance_recursive (line 1645) | def test_delete_instance_recursive(self): method test_delete_nullable (line 1682) | def test_delete_nullable(self): function incrementer (line 1714) | def incrementer(): class AutoCounter (line 1721) | class AutoCounter(TestModel): class TestDefaultDirtyBehavior (line 1726) | class TestDefaultDirtyBehavior(ModelTestCase): method tearDown (line 1730) | def tearDown(self): method test_default_dirty (line 1734) | def test_default_dirty(self): method test_save_only_dirty (line 1765) | def test_save_only_dirty(self): class TestDefaultValues (line 1794) | class TestDefaultValues(ModelTestCase): method test_default_present_on_insert (line 1798) | def test_default_present_on_insert(self): method test_default_present_on_create (line 1821) | def test_default_present_on_create(self): method test_defaults_from_cursor (line 1826) | def test_defaults_from_cursor(self): class TestFunctionCoerce (line 1857) | class TestFunctionCoerce(ModelTestCase): method test_coerce (line 1861) | def test_coerce(self): method test_scalar (line 1875) | def test_scalar(self): method test_safe_python_value (line 1888) | def test_safe_python_value(self): method test_conv_using_python_value (line 1901) | def test_conv_using_python_value(self): method test_no_coerce_count_avg (line 1918) | def test_no_coerce_count_avg(self): class TestJoinModelAlias (line 1936) | class TestJoinModelAlias(ModelTestCase): method setUp (line 1944) | def setUp(self): method _test_query (line 1955) | def _test_query(self, alias_expr): method assertTweets (line 1961) | def assertTweets(self, query, user_attr='user'): method test_control (line 1967) | def test_control(self): method test_join_aliased_columns (line 1970) | def test_join_aliased_columns(self): method test_join (line 1989) | def test_join(self): method test_join_on (line 1994) | def test_join_on(self): method test_join_on_field (line 1999) | def test_join_on_field(self): method test_join_on_alias (line 2005) | def test_join_on_alias(self): method test_join_attr (line 2011) | def test_join_attr(self): method test_join_on_alias_attr (line 2016) | def test_join_on_alias_attr(self): method _test_query_backref (line 2022) | def _test_query_backref(self, alias_expr): method assertUsers (line 2028) | def assertUsers(self, query, tweet_attr='tweet'): method test_control_backref (line 2034) | def test_control_backref(self): method test_join_backref (line 2037) | def test_join_backref(self): method test_join_on_backref (line 2042) | def test_join_on_backref(self): method test_join_on_field_backref (line 2048) | def test_join_on_field_backref(self): method test_join_on_alias_backref (line 2054) | def test_join_on_alias_backref(self): method test_join_attr_backref (line 2060) | def test_join_attr_backref(self): method test_join_alias_twice (line 2065) | def test_join_alias_twice(self): method test_alias_filter (line 2086) | def test_alias_filter(self): class TestWindowFunctionIntegration (line 2112) | class TestWindowFunctionIntegration(ModelTestCase): method setUp (line 2115) | def setUp(self): method test_simple_partition (line 2122) | def test_simple_partition(self): method test_mixed_ordering (line 2146) | def test_mixed_ordering(self): method test_reuse_window (line 2165) | def test_reuse_window(self): method test_ordered_window (line 2195) | def test_ordered_window(self): method test_two_windows (line 2211) | def test_two_windows(self): method test_empty_over (line 2228) | def test_empty_over(self): method test_bounds (line 2241) | def test_bounds(self): method test_frame_types (line 2271) | def test_frame_types(self): method test_filter_clause (line 2323) | def test_filter_clause(self): method test_filter_with_aggregate (line 2339) | def test_filter_with_aggregate(self): method test_row_number (line 2350) | def test_row_number(self): method test_sum_with_frame (line 2360) | def test_sum_with_frame(self): method test_lag_lead (line 2380) | def test_lag_lead(self): class TestForUpdateIntegration (line 2401) | class TestForUpdateIntegration(ModelTestCase): method setUp (line 2404) | def setUp(self): method tearDown (line 2418) | def tearDown(self): method test_for_update (line 2423) | def test_for_update(self): method test_for_update_blocking (line 2456) | def test_for_update_blocking(self): method test_for_update_nested (line 2489) | def test_for_update_nested(self): method test_for_update_nowait (line 2498) | def test_for_update_nowait(self): method test_for_update_of (line 2524) | def test_for_update_of(self): class ServerDefault (line 2570) | class ServerDefault(TestModel): class TestReturningIntegration (line 2575) | class TestReturningIntegration(ModelTestCase): method test_simple_returning (line 2578) | def test_simple_returning(self): method test_simple_returning_insert_update_delete (line 2641) | def test_simple_returning_insert_update_delete(self): method test_simple_insert_update_delete_no_returning (line 2663) | def test_simple_insert_update_delete_no_returning(self): method test_returning_server_defaults (line 2679) | def test_returning_server_defaults(self): method test_no_return (line 2698) | def test_no_return(self): method test_non_int_pk_returning (line 2707) | def test_non_int_pk_returning(self): method test_returning_multi (line 2715) | def test_returning_multi(self): method test_returning_query (line 2741) | def test_returning_query(self): method test_update_returning (line 2758) | def test_update_returning(self): method test_delete_returning (line 2776) | def test_delete_returning(self): class Member (line 2794) | class Member(TestModel): class TestCTEIntegration (line 2799) | class TestCTEIntegration(ModelTestCase): method setUp (line 2802) | def setUp(self): method test_docs_example (line 2816) | def test_docs_example(self): method test_simple_cte (line 2844) | def test_simple_cte(self): method test_cte_join (line 2879) | def test_cte_join(self): method test_recursive_cte (line 2907) | def test_recursive_cte(self): method test_recursive_cte2 (line 2968) | def test_recursive_cte2(self): method test_recursive_cte_docs_example (line 2993) | def test_recursive_cte_docs_example(self): method test_cte_reuse_aggregate (line 3033) | def test_cte_reuse_aggregate(self): method test_cte_with_aggregate_filter (line 3064) | def test_cte_with_aggregate_filter(self): class TestTupleComparison (line 3081) | class TestTupleComparison(ModelTestCase): method test_tuples (line 3084) | def test_tuples(self): method test_tuple_subquery (line 3095) | def test_tuple_subquery(self): method test_row_value_composite_key (line 3109) | def test_row_value_composite_key(self): class TestModelGraph (line 3125) | class TestModelGraph(BaseTestCase): method test_bind_model_database (line 3126) | def test_bind_model_database(self): class TestFieldInheritance (line 3151) | class TestFieldInheritance(BaseTestCase): method test_field_inheritance (line 3152) | def test_field_inheritance(self): method test_foreign_key_field_inheritance (line 3192) | def test_foreign_key_field_inheritance(self): method test_foreign_key_pk_inheritance (line 3245) | def test_foreign_key_pk_inheritance(self): method test_backref_inheritance (line 3286) | def test_backref_inheritance(self): method test_deferred_fk_creation (line 3326) | def test_deferred_fk_creation(self): class TestMetaTableName (line 3365) | class TestMetaTableName(BaseTestCase): method test_table_name_behavior (line 3366) | def test_table_name_behavior(self): class TestMetaInheritance (line 3393) | class TestMetaInheritance(BaseTestCase): method test_table_name (line 3394) | def test_table_name(self): method test_composite_key_inheritance (line 3416) | def test_composite_key_inheritance(self): method test_no_primary_key_inheritable (line 3437) | def test_no_primary_key_inheritable(self): method test_inheritance (line 3461) | def test_inheritance(self): method test_temporary_inheritance (line 3500) | def test_temporary_inheritance(self): class TestModelMetadataMisc (line 3517) | class TestModelMetadataMisc(BaseTestCase): method test_subclass_aware_metadata (line 3520) | def test_subclass_aware_metadata(self): class TestModelSetDatabase (line 3555) | class TestModelSetDatabase(BaseTestCase): method test_set_database (line 3556) | def test_set_database(self): class TestForeignKeyFieldDescriptors (line 3572) | class TestForeignKeyFieldDescriptors(BaseTestCase): method test_foreign_key_field_descriptors (line 3573) | def test_foreign_key_field_descriptors(self): method test_column_name (line 3609) | def test_column_name(self): class TestModelAliasFieldProperties (line 3618) | class TestModelAliasFieldProperties(ModelTestCase): method test_field_properties (line 3621) | def test_field_properties(self): class OnConflictTests (line 3670) | class OnConflictTests(object): method setUp (line 3678) | def setUp(self): method assertData (line 3683) | def assertData(self, expected): method test_ignore (line 3690) | def test_ignore(self): function requires_upsert (line 3698) | def requires_upsert(m): class KV (line 3703) | class KV(TestModel): class PGOnConflictTests (line 3708) | class PGOnConflictTests(OnConflictTests): method test_update (line 3710) | def test_update(self): method test_update_ignore_with_conflict_target (line 3741) | def test_update_ignore_with_conflict_target(self): method test_update_atomic (line 3759) | def test_update_atomic(self): method test_update_where_clause (line 3789) | def test_update_where_clause(self): method test_conflict_update_excluded (line 3824) | def test_conflict_update_excluded(self): method test_conflict_update_excluded2 (line 3839) | def test_conflict_update_excluded2(self): method test_conflict_target_constraint_where (line 3857) | def test_conflict_target_constraint_where(self): class TestUpsertMySQL (line 3901) | class TestUpsertMySQL(OnConflictTests, ModelTestCase): method test_replace (line 3902) | def test_replace(self): method test_update (line 3935) | def test_update(self): method test_update_preserve (line 3964) | def test_update_preserve(self): class TestReplaceSqlite (line 3988) | class TestReplaceSqlite(OnConflictTests, ModelTestCase): method test_replace (line 3991) | def test_replace(self): method test_model_replace (line 4023) | def test_model_replace(self): class TestUpsertSqlite (line 4049) | class TestUpsertSqlite(PGOnConflictTests, ModelTestCase): method test_no_preserve_update_where (line 4053) | def test_no_preserve_update_where(self): method test_update_meets_requirements (line 4067) | def test_update_meets_requirements(self): method test_do_nothing (line 4080) | def test_do_nothing(self): class UKV (line 4092) | class UKV(TestModel): class Meta (line 4097) | class Meta: class UKVRel (line 4103) | class UKVRel(TestModel): class Meta (line 4108) | class Meta: class TestUpsertPostgresql (line 4115) | class TestUpsertPostgresql(PGOnConflictTests, ModelTestCase): method test_conflict_target_constraint (line 4118) | def test_conflict_target_constraint(self): method test_conflict_ambiguous_column (line 4156) | def test_conflict_ambiguous_column(self): method test_upsert_preserves_existing (line 4187) | def test_upsert_preserves_existing(self): method test_upsert_update_expression (line 4202) | def test_upsert_update_expression(self): class TestJoinSubquery (line 4216) | class TestJoinSubquery(ModelTestCase): method test_join_subquery (line 4219) | def test_join_subquery(self): class TestSumCase (line 4272) | class TestSumCase(ModelTestCase): method test_sum_case (line 4274) | def test_sum_case(self): class TUser (line 4299) | class TUser(TestModel): class Transaction (line 4303) | class Transaction(TestModel): class TestMaxAlias (line 4308) | class TestMaxAlias(ModelTestCase): method test_max_alias (line 4311) | def test_max_alias(self): class CNote (line 4339) | class CNote(TestModel): class CFile (line 4343) | class CFile(TestModel): class TestCompoundSelectModels (line 4349) | class TestCompoundSelectModels(ModelTestCase): method setUp (line 4352) | def setUp(self): method test_mix_models_with_model_row_type (line 4374) | def test_mix_models_with_model_row_type(self): method test_mixed_models_tuple_row_type (line 4388) | def test_mixed_models_tuple_row_type(self): method test_mixed_models_dict_row_type (line 4402) | def test_mixed_models_dict_row_type(self): class SequenceModel (line 4414) | class SequenceModel(TestModel): class TestSequence (line 4420) | class TestSequence(ModelTestCase): method test_create_table (line 4423) | def test_create_table(self): method test_sequence (line 4431) | def test_sequence(self): class TestUpdateFromIntegration (line 4443) | class TestUpdateFromIntegration(ModelTestCase): method test_update_from (line 4446) | def test_update_from(self): method test_update_from_subselect (line 4459) | def test_update_from_subselect(self): method test_update_from_simple (line 4474) | def test_update_from_simple(self): class TestLateralJoin (line 4489) | class TestLateralJoin(ModelTestCase): method test_lateral_join (line 4492) | def test_lateral_join(self): class Task (line 4533) | class Task(TestModel): class TestMultiSelfJoin (line 4543) | class TestMultiSelfJoin(ModelTestCase): method setUp (line 4546) | def setUp(self): method test_multi_self_join (line 4565) | def test_multi_self_join(self): class Product (line 4600) | class Product(TestModel): class Meta (line 4606) | class Meta: class TestModelConstraints (line 4610) | class TestModelConstraints(ModelTestCase): method test_model_constraints (line 4613) | def test_model_constraints(self): class TestModelFieldReprs (line 4645) | class TestModelFieldReprs(BaseTestCase): method test_model_reprs (line 4646) | def test_model_reprs(self): method test_model_str_method (line 4686) | def test_model_str_method(self): class TestGetWithSecondDatabase (line 4697) | class TestGetWithSecondDatabase(ModelTestCase): method test_get_with_second_database (line 4701) | def test_get_with_second_database(self): class TestMixModelsTables (line 4719) | class TestMixModelsTables(ModelTestCase): method test_mix_models_tables (line 4723) | def test_mix_models_tables(self): class TestDatabaseExecuteQuery (line 4740) | class TestDatabaseExecuteQuery(ModelTestCase): method test_execute_query (line 4744) | def test_execute_query(self): class Datum (line 4753) | class Datum(TestModel): class TestNullOrdering (line 4757) | class TestNullOrdering(ModelTestCase): method test_null_ordering (line 4760) | def test_null_ordering(self): class Student (line 4787) | class Student(TestModel): class Course (line 4790) | class Course(TestModel): class Attendance (line 4793) | class Attendance(TestModel): class TestManyToManyJoining (line 4798) | class TestManyToManyJoining(ModelTestCase): method setUp (line 4801) | def setUp(self): method assertQuery (line 4817) | def assertQuery(self, query): method test_join_subquery (line 4829) | def test_join_subquery(self): method test_join_where_subquery (line 4842) | def test_join_where_subquery(self): class TestColumnNameStripping (line 4852) | class TestColumnNameStripping(ModelTestCase): method test_column_name_stripping (line 4856) | def test_column_name_stripping(self): class VL (line 4875) | class VL(TestModel): class TestValuesListIntegration (line 4881) | class TestValuesListIntegration(ModelTestCase): method test_insert_into_select_from_vl (line 4885) | def test_insert_into_select_from_vl(self): method test_update_vl_cte (line 4896) | def test_update_vl_cte(self): method test_values_list (line 4920) | def test_values_list(self): method test_values_list_named_columns (line 4927) | def test_values_list_named_columns(self): method test_values_list_named_columns_in_cte (line 4935) | def test_values_list_named_columns_in_cte(self): method test_named_values_list (line 4945) | def test_named_values_list(self): class C_Product (line 4951) | class C_Product(TestModel): class C_Archive (line 4955) | class C_Archive(TestModel): class C_Part (line 4959) | class C_Part(TestModel): class TestDataModifyingCTEIntegration (line 4964) | class TestDataModifyingCTEIntegration(ModelTestCase): method setUp (line 4967) | def setUp(self): method test_data_modifying_cte_delete (line 4978) | def test_data_modifying_cte_delete(self): method test_data_modifying_cte_update (line 5018) | def test_data_modifying_cte_update(self): method test_data_modifying_cte_insert (line 5050) | def test_data_modifying_cte_insert(self): class TestBindTo (line 5075) | class TestBindTo(ModelTestCase): method test_bind_to (line 5078) | def test_bind_to(self): class CascadeParent (line 5124) | class CascadeParent(TestModel): class CascadeChild (line 5127) | class CascadeChild(TestModel): class TestCascadeDeleteIntegration (line 5133) | class TestCascadeDeleteIntegration(ModelTestCase): method setUp (line 5136) | def setUp(self): method test_cascade_delete (line 5141) | def test_cascade_delete(self): FILE: tests/mysql_ext.py class Person (line 31) | class Person(TestModel): class Note (line 37) | class Note(TestModel): class KJ (line 43) | class KJ(TestModel): class TestMySQLConnector (line 50) | class TestMySQLConnector(ModelTestCase): method test_basic_operations (line 54) | def test_basic_operations(self): class TestMariaDBConnector (line 92) | class TestMariaDBConnector(TestMySQLConnector): class TestMySQLJSONField (line 98) | class TestMySQLJSONField(ModelTestCase): method test_mysql_json_field (line 101) | def test_mysql_json_field(self): class TestMatchExpression (line 125) | class TestMatchExpression(ModelDatabaseTestCase): method test_match_expression (line 128) | def test_match_expression(self): FILE: tests/pool.py class FakeTransaction (line 23) | class FakeTransaction(_transaction): method _add_history (line 24) | def _add_history(self, message): method __enter__ (line 28) | def __enter__(self): method __exit__ (line 33) | def __exit__(self, *args): class FakeDatabase (line 38) | class FakeDatabase(SqliteDatabase): method __init__ (line 39) | def __init__(self, *args, **kwargs): method _connect (line 44) | def _connect(self): method _close (line 48) | def _close(self, conn): method transaction (line 51) | def transaction(self): class FakePooledDatabase (line 55) | class FakePooledDatabase(PooledDatabase, FakeDatabase): method __init__ (line 56) | def __init__(self, *args, **kwargs): class PooledTestDatabase (line 61) | class PooledTestDatabase(PooledDatabase, SqliteDatabase): function push_conn (line 65) | def push_conn(db, timestamp, conn): class TestPooledDatabase (line 71) | class TestPooledDatabase(BaseTestCase): method setUp (line 72) | def setUp(self): method test_connection_pool (line 76) | def test_connection_pool(self): method test_reuse_connection (line 85) | def test_reuse_connection(self): method test_concurrent_connections (line 96) | def test_concurrent_connections(self): method test_max_conns (line 120) | def test_max_conns(self): method test_stale_timeout (line 128) | def test_stale_timeout(self): method test_stale_on_checkout (line 146) | def test_stale_on_checkout(self): method test_manual_close (line 167) | def test_manual_close(self): method test_close_idle (line 185) | def test_close_idle(self): method test_close_stale (line 206) | def test_close_stale(self): method test_close_all (line 220) | def test_close_all(self): method test_stale_timeout_cascade (line 236) | def test_stale_timeout_cascade(self): method test_connect_cascade (line 254) | def test_connect_cascade(self): method test_db_context (line 291) | def test_db_context(self): method test_db_context_threads (line 306) | def test_db_context_threads(self): method test_heap_counter_deterministic_ordering (line 322) | def test_heap_counter_deterministic_ordering(self): method test_close_conn_removes_from_in_use (line 336) | def test_close_conn_removes_from_in_use(self): method test_double_close_is_noop (line 348) | def test_double_close_is_noop(self): method test_can_reuse_false_closes_connection (line 362) | def test_can_reuse_false_closes_connection(self): method test_close_raw_swallows_exception (line 383) | def test_close_raw_swallows_exception(self): method test_close_stale_removes_from_in_use (line 398) | def test_close_stale_removes_from_in_use(self): method test_close_all_clears_both_pools (line 413) | def test_close_all_clears_both_pools(self): method test_connect_timeout_with_condition_variable (line 444) | def test_connect_timeout_with_condition_variable(self): method test_connect_timeout_wakes_on_return (line 468) | def test_connect_timeout_wakes_on_return(self): method test_connect_timeout_zero_becomes_infinite (line 497) | def test_connect_timeout_zero_becomes_infinite(self): method test_close_all_wakes_waiters (line 502) | def test_close_all_wakes_waiters(self): method test_close_stale_iteration (line 530) | def test_close_stale_iteration(self): method test_concurrent_close_stale_and_return (line 540) | def test_concurrent_close_stale_and_return(self): method test_manual_close_when_already_closed (line 590) | def test_manual_close_when_already_closed(self): method test_close_idle_driver_closes_all (line 598) | def test_close_idle_driver_closes_all(self): method test_max_connections_zero_means_unlimited (line 610) | def test_max_connections_zero_means_unlimited(self): method test_stale_and_closed_all_skipped (line 618) | def test_stale_and_closed_all_skipped(self): method test_init_updates_pool_parameters (line 635) | def test_init_updates_pool_parameters(self): method test_init_timeout_zero_becomes_infinite (line 649) | def test_init_timeout_zero_becomes_infinite(self): class TestLivePooledDatabase (line 657) | class TestLivePooledDatabase(ModelTestCase): method tearDown (line 661) | def tearDown(self): method test_reuse_connection (line 667) | def test_reuse_connection(self): method test_db_context (line 680) | def test_db_context(self): method test_bad_connection (line 696) | def test_bad_connection(self): class TestPooledDatabaseIntegration (line 706) | class TestPooledDatabaseIntegration(ModelTestCase): method setUp (line 709) | def setUp(self): method assertConnections (line 723) | def assertConnections(self, expected): method test_pooled_database_integration (line 730) | def test_pooled_database_integration(self): method test_pool_with_models (line 774) | def test_pool_with_models(self): FILE: tests/postgres.py class HStoreModel (line 32) | class HStoreModel(TestModel): class ArrayModel (line 38) | class ArrayModel(TestModel): class UUIDList (line 43) | class UUIDList(TestModel): class ArrayTSModel (line 49) | class ArrayTSModel(TestModel): class DecimalArray (line 54) | class DecimalArray(TestModel): class FTSModel (line 58) | class FTSModel(TestModel): class JsonModel (line 64) | class JsonModel(TestModel): class JsonModelNull (line 67) | class JsonModelNull(TestModel): class BJson (line 70) | class BJson(TestModel): class JData (line 73) | class JData(TestModel): class UUIDEncoder (line 78) | class UUIDEncoder(json.JSONEncoder): method default (line 79) | def default(self, obj): function dumps (line 84) | def dumps(obj): class CustomJSONDumps (line 88) | class CustomJSONDumps(TestModel): class Normal (line 93) | class Normal(TestModel): class Event (line 97) | class Event(TestModel): class TZModel (line 102) | class TZModel(TestModel): class TestTZField (line 106) | class TestTZField(ModelTestCase): method test_tz_field (line 111) | def test_tz_field(self): class TestHStoreField (line 159) | class TestHStoreField(ModelTestCase): method setUp (line 164) | def setUp(self): method by_name (line 169) | def by_name(self, name): method test_hstore_storage (line 172) | def test_hstore_storage(self): method query (line 183) | def query(self, *cols): method test_hstore_selecting (line 188) | def test_hstore_selecting(self): method assertWhere (line 226) | def assertWhere(self, expr, names): method test_hstore_filtering (line 230) | def test_hstore_filtering(self): method test_hstore_filter_functions (line 248) | def test_hstore_filter_functions(self): method test_hstore_update (line 254) | def test_hstore_update(self): class TestArrayField (line 297) | class TestArrayField(ModelTestCase): method create_sample (line 301) | def create_sample(self): method test_index_expression (line 306) | def test_index_expression(self): method test_hashable_objectslice (line 325) | def test_hashable_objectslice(self): method test_array_get_set (line 337) | def test_array_get_set(self): method test_array_equality (line 343) | def test_array_equality(self): method test_array_db_value (line 357) | def test_array_db_value(self): method test_array_search (line 362) | def test_array_search(self): method test_array_index_slice (line 401) | def test_array_index_slice(self): method test_field_kwargs (line 428) | def test_field_kwargs(self): class TestArrayFieldConvertValues (line 438) | class TestArrayFieldConvertValues(ModelTestCase): method dt (line 442) | def dt(self, day, hour=0, minute=0, second=0): method test_value_conversion (line 445) | def test_value_conversion(self): method test_get_with_array_values (line 470) | def test_get_with_array_values(self): class TestArrayUUIDField (line 493) | class TestArrayUUIDField(ModelTestCase): method test_array_of_uuids (line 497) | def test_array_of_uuids(self): class TestTSVectorField (line 513) | class TestTSVectorField(ModelTestCase): method setUp (line 526) | def setUp(self): method assertMessages (line 532) | def assertMessages(self, expr, expected): method test_sql (line 537) | def test_sql(self): method test_match_function (line 544) | def test_match_function(self): method test_tsvector_field (line 554) | def test_tsvector_field(self): function pg12 (line 572) | def pg12(): class TestJsonField (line 577) | class TestJsonField(BaseJsonFieldTestCase, ModelTestCase): method test_json_null (line 583) | def test_json_null(self): class TestBinaryJsonField (line 597) | class TestBinaryJsonField(BaseBinaryJsonFieldTestCase, ModelTestCase): method test_remove_data (line 603) | def test_remove_data(self): method test_remove_path (line 622) | def test_remove_path(self): method test_json_length (line 653) | def test_json_length(self): method test_json_extract (line 675) | def test_json_extract(self): method test_json_contains_in_list (line 697) | def test_json_contains_in_list(self): method test_integer_index_weirdness (line 708) | def test_integer_index_weirdness(self): class TestJsonFieldRegressions (line 721) | class TestJsonFieldRegressions(ModelTestCase): method test_json_field_concat (line 725) | def test_json_field_concat(self): method test_introspect_bjson_field (line 735) | def test_introspect_bjson_field(self): class TestJSONFieldCustomDumps (line 747) | class TestJSONFieldCustomDumps(ModelTestCase): method test_custom_dumps (line 751) | def test_custom_dumps(self): class TestIntervalField (line 769) | class TestIntervalField(ModelTestCase): method test_interval_field (line 773) | def test_interval_field(self): class TestIndexedField (line 789) | class TestIndexedField(BaseTestCase): method test_indexed_field_ddl (line 790) | def test_indexed_field_ddl(self): class IDAlways (line 826) | class IDAlways(TestModel): class IDByDefault (line 831) | class IDByDefault(TestModel): class TestIdentityField (line 836) | class TestIdentityField(ModelTestCase): method test_identity_field_always (line 840) | def test_identity_field_always(self): method test_identity_field_by_default (line 854) | def test_identity_field_by_default(self): method test_schema (line 866) | def test_schema(self): class TestServerSide (line 878) | class TestServerSide(ModelTestCase): method setUp (line 882) | def setUp(self): method test_server_side_cursor (line 888) | def test_server_side_cursor(self): method test_lower_level_apis (line 901) | def test_lower_level_apis(self): method test_close_cursor (line 912) | def test_close_cursor(self): class KX (line 928) | class KX(TestModel): class TestAutocommitIntegration (line 932) | class TestAutocommitIntegration(ModelTestCase): method setUp (line 936) | def setUp(self): method force_integrity_error (line 941) | def force_integrity_error(self): method test_autocommit_default (line 946) | def test_autocommit_default(self): method test_autocommit_disabled (line 956) | def test_autocommit_disabled(self): method test_atomic_block (line 968) | def test_atomic_block(self): method test_atomic_block_exception (line 979) | def test_atomic_block_exception(self): class TestPostgresIsolationLevel (line 988) | class TestPostgresIsolationLevel(DatabaseTestCase): method test_isolation_level (line 991) | def test_isolation_level(self): method test_isolation_level_str (line 1009) | def test_isolation_level_str(self): method test_isolation_level_mixed (line 1022) | def test_isolation_level_mixed(self): class TestPostgresCTEMaterialization (line 1037) | class TestPostgresCTEMaterialization(ModelTestCase): method test_postgres_cte_materialization (line 1041) | def test_postgres_cte_materialization(self): class TestPostgresLateralJoin (line 1053) | class TestPostgresLateralJoin(ModelTestCase): method create_data (line 1064) | def create_data(self): method test_lateral_top_n (line 1073) | def test_lateral_top_n(self): method test_lateral_helper (line 1108) | def test_lateral_helper(self): FILE: tests/postgres_helpers.py class BaseJsonFieldTestCase (line 4) | class BaseJsonFieldTestCase(object): method test_json_field (line 9) | def test_json_field(self): method test_joining_on_json_key (line 15) | def test_joining_on_json_key(self): method test_json_lookup_methods (line 39) | def test_json_lookup_methods(self): method test_json_cast (line 75) | def test_json_cast(self): method test_json_path (line 84) | def test_json_path(self): method test_json_field_sql (line 112) | def test_json_field_sql(self): method assertItems (line 129) | def assertItems(self, where, *items): method test_lookup (line 138) | def test_lookup(self): method test_bulk_update (line 156) | def test_bulk_update(self): method test_json_bulk_update_top_level_list (line 172) | def test_json_bulk_update_top_level_list(self): class BaseBinaryJsonFieldTestCase (line 186) | class BaseBinaryJsonFieldTestCase(BaseJsonFieldTestCase): method _create_test_data (line 187) | def _create_test_data(self): method assertObjects (line 200) | def assertObjects(self, expr, *indexes): method test_contained_by (line 209) | def test_contained_by(self): method test_contained_by_nested (line 222) | def test_contained_by_nested(self): method test_equality (line 230) | def test_equality(self): method test_subscript_contains (line 236) | def test_subscript_contains(self): method test_contains (line 275) | def test_contains(self): method test_contains_contained_by (line 324) | def test_contains_contained_by(self): method test_concat_data (line 345) | def test_concat_data(self): method test_update_data_inplace (line 375) | def test_update_data_inplace(self): method test_selecting (line 385) | def test_selecting(self): method test_conflict_update (line 413) | def test_conflict_update(self): FILE: tests/prefetch_tests.py class Person (line 9) | class Person(TestModel): class Relationship (line 13) | class Relationship(TestModel): class Note (line 18) | class Note(TestModel): class NoteItem (line 23) | class NoteItem(TestModel): class Like (line 28) | class Like(TestModel): class Flag (line 33) | class Flag(TestModel): class Category (line 38) | class Category(TestModel): class Package (line 43) | class Package(TestModel): class PackageItem (line 47) | class PackageItem(TestModel): class TestPrefetch (line 52) | class TestPrefetch(ModelTestCase): method create_test_data (line 56) | def create_test_data(self): method setUp (line 82) | def setUp(self): method accumulate_results (line 86) | def accumulate_results(self, query, sort_items=False): method test_prefetch_simple (line 102) | def test_prefetch_simple(self): method test_prefetch_filter (line 120) | def test_prefetch_filter(self): method test_prefetch_reverse (line 137) | def test_prefetch_reverse(self): method test_prefetch_reverse_with_parent_join (line 151) | def test_prefetch_reverse_with_parent_join(self): method test_prefetch_multi_depth (line 172) | def test_prefetch_multi_depth(self): method test_prefetch_multi_depth_no_join (line 214) | def test_prefetch_multi_depth_no_join(self): method test_prefetch_with_group_by (line 246) | def test_prefetch_with_group_by(self): method test_prefetch_self_join (line 274) | def test_prefetch_self_join(self): method test_prefetch_adjacency_list (line 304) | def test_prefetch_adjacency_list(self): method test_prefetch_specific_model (line 347) | def test_prefetch_specific_model(self): method test_multiple_foreign_keys (line 381) | def test_multiple_foreign_keys(self): method test_prefetch_through_manytomany (line 469) | def test_prefetch_through_manytomany(self): method test_prefetch_non_pk_fk (line 495) | def test_prefetch_non_pk_fk(self): method test_prefetch_mark_dirty_regression (line 518) | def test_prefetch_mark_dirty_regression(self): class X (line 531) | class X(TestModel): class Z (line 533) | class Z(TestModel): class A (line 537) | class A(TestModel): class B (line 540) | class B(TestModel): class C (line 544) | class C(TestModel): class C1 (line 549) | class C1(TestModel): class C2 (line 552) | class C2(TestModel): class TestPrefetchMultiRefs (line 557) | class TestPrefetchMultiRefs(ModelTestCase): method test_prefetch_multirefs (line 561) | def test_prefetch_multirefs(self): FILE: tests/pwasyncio.py class TestModel (line 34) | class TestModel(Model): class User (line 38) | class User(Model): class Tweet (line 41) | class Tweet(Model): class TestGreenletSpawn (line 46) | class TestGreenletSpawn(unittest.IsolatedAsyncioTestCase): method test_simple_function (line 47) | async def test_simple_function(self): method test_function_with_await (line 51) | async def test_function_with_await(self): method test_multiple_awaits (line 59) | async def test_multiple_awaits(self): method test_exception_propagation (line 67) | async def test_exception_propagation(self): method test_exception_in_awaitable (line 71) | async def test_exception_in_awaitable(self): method test_await_outside_greenlet (line 77) | def test_await_outside_greenlet(self): method test_contextvars (line 81) | async def test_contextvars(self): class TestConnectionState (line 96) | class TestConnectionState(unittest.IsolatedAsyncioTestCase): method test_task_isolation (line 97) | async def test_task_isolation(self): method test_state_attributes (line 106) | async def test_state_attributes(self): method test_get_returns_fresh_state (line 114) | async def test_get_returns_fresh_state(self): method test_reset (line 120) | async def test_reset(self): method test_set_connection (line 129) | async def test_set_connection(self): method test_done_callback_orphans_connection (line 136) | async def test_done_callback_orphans_connection(self): method test_done_callback_noop_when_closed (line 150) | async def test_done_callback_noop_when_closed(self): function _make_lazy_cursor (line 162) | def _make_lazy_cursor(rows, batch_size=2): class TestCursorAdapter (line 182) | class TestCursorAdapter(unittest.IsolatedAsyncioTestCase): method test_eager_fetchone (line 183) | def test_eager_fetchone(self): method test_eager_fetchall (line 190) | def test_eager_fetchall(self): method test_eager_iter (line 195) | def test_eager_iter(self): method test_eager_metadata (line 200) | def test_eager_metadata(self): method test_lazy_fetchone_batches (line 214) | async def test_lazy_fetchone_batches(self): method test_lazy_fetchone_empty (line 232) | async def test_lazy_fetchone_empty(self): method test_lazy_iter (line 238) | async def test_lazy_iter(self): method test_lazy_fetchall (line 245) | async def test_lazy_fetchall(self): method test_lazy_buffer_reuse (line 250) | async def test_lazy_buffer_reuse(self): method test_lazy_description (line 261) | async def test_lazy_description(self): method test_lazy_buffer_size_override (line 265) | async def test_lazy_buffer_size_override(self): method test_aclose_cleanup (line 272) | async def test_aclose_cleanup(self): method test_aclose_idempotent (line 279) | async def test_aclose_idempotent(self): method test_aclose_noop_for_eager (line 289) | async def test_aclose_noop_for_eager(self): method test_lazy_cursor_iter (line 292) | async def test_lazy_cursor_iter(self): method test_lazy_cursor_iter_empty (line 298) | async def test_lazy_cursor_iter_empty(self): class TestConnectionWrappers (line 304) | class TestConnectionWrappers(unittest.IsolatedAsyncioTestCase): method test_sqlite_execute (line 305) | async def test_sqlite_execute(self): method test_sqlite_execute_iter_returns_lazy (line 321) | async def test_sqlite_execute_iter_returns_lazy(self): method test_sqlite_execute_iter_lock_lifecycle (line 334) | async def test_sqlite_execute_iter_lock_lifecycle(self): method test_sqlite_execute_iter_lock_on_failure (line 347) | async def test_sqlite_execute_iter_lock_on_failure(self): method test_mysql_execute (line 355) | async def test_mysql_execute(self): method test_mysql_cursor_closed_on_error (line 370) | async def test_mysql_cursor_closed_on_error(self): method test_mysql_concurrent_serialized (line 380) | async def test_mysql_concurrent_serialized(self): method test_mysql_execute_iter_uses_ss_cursor (line 399) | async def test_mysql_execute_iter_uses_ss_cursor(self): method test_mysql_execute_iter_lock_lifecycle (line 416) | async def test_mysql_execute_iter_lock_lifecycle(self): method test_pg_parameter_conversion (line 434) | async def test_pg_parameter_conversion(self): method test_pg_concurrent_serialized (line 445) | async def test_pg_concurrent_serialized(self): method test_pg_no_params (line 462) | async def test_pg_no_params(self): method test_pg_empty_results (line 469) | async def test_pg_empty_results(self): method test_translate_placeholders (line 477) | def test_translate_placeholders(self): method _pg_mocks (line 487) | def _pg_mocks(self, rows=None): method test_pg_execute_iter_description (line 506) | async def test_pg_execute_iter_description(self): method test_pg_execute_iter_starts_transaction (line 517) | async def test_pg_execute_iter_starts_transaction(self): method test_pg_execute_iter_cleanup_rolls_back (line 525) | async def test_pg_execute_iter_cleanup_rolls_back(self): method test_pg_execute_iter_translates_placeholders (line 534) | async def test_pg_execute_iter_translates_placeholders(self): method test_pg_execute_iter_lock_on_failure (line 544) | async def test_pg_execute_iter_lock_on_failure(self): class TestTaskLifecycle (line 553) | class TestTaskLifecycle(unittest.IsolatedAsyncioTestCase): method asyncSetUp (line 554) | async def asyncSetUp(self): method asyncTearDown (line 564) | async def asyncTearDown(self): method test_task_id_behavior (line 571) | async def test_task_id_behavior(self): method test_task_state_cleanup_after_completion (line 608) | async def test_task_state_cleanup_after_completion(self): method test_concurrent_task_state_isolation (line 624) | async def test_concurrent_task_state_isolation(self): method test_connection_returned_when_task_dies (line 637) | async def test_connection_returned_when_task_dies(self): class IntegrationTests (line 650) | class IntegrationTests(object): method get_database (line 654) | def get_database(self): method tearDown (line 659) | def tearDown(self): method asyncSetUp (line 663) | async def asyncSetUp(self): method asyncTearDown (line 689) | async def asyncTearDown(self): method create_record (line 695) | async def create_record(self, name='test', value=1): method assertCount (line 698) | async def assertCount(self, expected): method assertNames (line 702) | async def assertNames(self, expected): method seed (line 706) | async def seed(self, n=20): method test_pool_created_on_connect (line 713) | async def test_pool_created_on_connect(self): method test_is_closed (line 725) | async def test_is_closed(self): method test_multiple_close_safe (line 732) | async def test_multiple_close_safe(self): method test_reconnect_after_pool_close (line 739) | async def test_reconnect_after_pool_close(self): method test_connection_reuse_within_task (line 749) | async def test_connection_reuse_within_task(self): method test_closing_flag_prevents_connect (line 758) | async def test_closing_flag_prevents_connect(self): method test_double_close_pool (line 766) | async def test_double_close_pool(self): method test_dead_connection_replaced (line 771) | async def test_dead_connection_replaced(self): method test_context_manager (line 783) | async def test_context_manager(self): method test_exception_in_context_manager (line 792) | async def test_exception_in_context_manager(self): method test_execute_sql (line 807) | async def test_execute_sql(self): method test_multiple_tasks_raw_sql (line 814) | async def test_multiple_tasks_raw_sql(self): method test_list (line 831) | async def test_list(self): method test_list_empty (line 839) | async def test_list_empty(self): method test_get (line 842) | async def test_get(self): method test_get_not_found (line 850) | async def test_get_not_found(self): method test_scalar (line 855) | async def test_scalar(self): method test_scalar_no_results (line 860) | async def test_scalar_no_results(self): method test_count (line 867) | async def test_count(self): method test_exists (line 872) | async def test_exists(self): method test_aexecute (line 877) | async def test_aexecute(self): method test_run_contextvars (line 917) | async def test_run_contextvars(self): method test_create (line 928) | async def test_create(self): method test_select (line 940) | async def test_select(self): method test_filter (line 947) | async def test_filter(self): method test_ordering (line 953) | async def test_ordering(self): method test_create_save_update (line 960) | async def test_create_save_update(self): method test_update (line 978) | async def test_update(self): method test_delete (line 989) | async def test_delete(self): method test_bulk_create (line 998) | async def test_bulk_create(self): method test_bulk_update (line 1003) | async def test_bulk_update(self): method test_insert_many (line 1022) | async def test_insert_many(self): method test_atomic (line 1039) | async def test_atomic(self): method test_transaction_commit (line 1056) | async def test_transaction_commit(self): method test_transaction_rollback (line 1069) | async def test_transaction_rollback(self): method test_nested_transactions (line 1084) | async def test_nested_transactions(self): method test_nested_implicit_rollback (line 1107) | async def test_nested_implicit_rollback(self): method test_nested_explicit_rollback (line 1136) | async def test_nested_explicit_rollback(self): method test_nested_mix (line 1163) | async def test_nested_mix(self): method test_acommit_arollback (line 1208) | async def test_acommit_arollback(self): method test_concurrent_reads_writes (line 1218) | async def test_concurrent_reads_writes(self): method test_isolated_connections_per_task (line 1239) | async def test_isolated_connections_per_task(self): method test_many_concurrent_tasks (line 1250) | async def test_many_concurrent_tasks(self): method test_syntax_error_recovery (line 1258) | async def test_syntax_error_recovery(self): method test_concurrent_errors (line 1264) | async def test_concurrent_errors(self): method test_iterate_yields_model_instances (line 1284) | async def test_iterate_yields_model_instances(self): method test_iterate_matches_list (line 1298) | async def test_iterate_matches_list(self): method test_iterate_dicts (line 1310) | async def test_iterate_dicts(self): method test_iterate_tuples (line 1320) | async def test_iterate_tuples(self): method test_iterate_namedtuples (line 1330) | async def test_iterate_namedtuples(self): method test_iterate_with_where (line 1341) | async def test_iterate_with_where(self): method test_iterate_empty (line 1352) | async def test_iterate_empty(self): method test_iterate_buffer_size (line 1357) | async def test_iterate_buffer_size(self): method test_iterate_early_break (line 1366) | async def test_iterate_early_break(self): method test_iterate_aggregation (line 1378) | async def test_iterate_aggregation(self): method test_iterate_sequential (line 1388) | async def test_iterate_sequential(self): method test_iterate_break_then_iterate_again (line 1403) | async def test_iterate_break_then_iterate_again(self): method test_iterate_multi (line 1413) | async def test_iterate_multi(self): method test_basic_crud (line 1424) | async def test_basic_crud(self): method test_foreign_keys (line 1439) | async def test_foreign_keys(self): method test_transactions (line 1477) | async def test_transactions(self): class TestSqliteIntegration (line 1507) | class TestSqliteIntegration(IntegrationTests, unittest.IsolatedAsyncioTe... method get_database (line 1508) | def get_database(self): method test_pragmas (line 1513) | async def test_pragmas(self): method test_custom_functions (line 1520) | async def test_custom_functions(self): method test_constraint_violation_recovery (line 1532) | async def test_constraint_violation_recovery(self): class TestPostgresqlIntegration (line 1546) | class TestPostgresqlIntegration(IntegrationTests, unittest.IsolatedAsync... method get_database (line 1547) | def get_database(self): method test_placeholder_conversion (line 1550) | async def test_placeholder_conversion(self): method test_iterator_with_transaction (line 1570) | async def test_iterator_with_transaction(self): class TestMySQLIntegration (line 1582) | class TestMySQLIntegration(IntegrationTests, unittest.IsolatedAsyncioTes... method get_database (line 1583) | def get_database(self): FILE: tests/pwasyncio_stress.py function make_db_params (line 10) | def make_db_params(key): class User (line 23) | class User(Model): class Meta (line 27) | class Meta: function worker_task (line 30) | async def worker_task(db, task_id, num_operations=10): function stress_test (line 87) | async def stress_test(db, num_tasks=100, ops_per_task=10): function test_connection_isolation (line 147) | async def test_connection_isolation(): function test_pool_exhaustion (line 198) | async def test_pool_exhaustion(): function main (line 236) | async def main(): FILE: tests/pwiz_integration.py class User (line 20) | class User(TestModel): class Note (line 25) | class Note(TestModel): class Meta (line 31) | class Meta: class Category (line 38) | class Category(TestModel): class OddColumnNames (line 43) | class OddColumnNames(TestModel): class Meta (line 47) | class Meta: class Event (line 51) | class Event(TestModel): class capture_output (line 56) | class capture_output(object): method __enter__ (line 57) | def __enter__(self): method __exit__ (line 62) | def __exit__(self, *args): class BasePwizTestCase (line 141) | class BasePwizTestCase(ModelTestCase): method setUp (line 145) | def setUp(self): class TestPwiz (line 155) | class TestPwiz(BasePwizTestCase): method test_print_models (line 158) | def test_print_models(self): method test_print_header (line 164) | def test_print_header(self): class TestPwizOrdered (line 181) | class TestPwizOrdered(BasePwizTestCase): method test_ordered_columns (line 184) | def test_ordered_columns(self): class TestPwizUnknownField (line 191) | class TestPwizUnknownField(BasePwizTestCase): method setUp (line 199) | def setUp(self): method test_unknown_field (line 205) | def test_unknown_field(self): method test_ignore_unknown (line 216) | def test_ignore_unknown(self): class TestPwizInvalidColumns (line 228) | class TestPwizInvalidColumns(BasePwizTestCase): method test_invalid_columns (line 231) | def test_invalid_columns(self): method test_odd_columns_legacy (line 248) | def test_odd_columns_legacy(self): class TestPwizIntrospectViews (line 266) | class TestPwizIntrospectViews(BasePwizTestCase): method setUp (line 269) | def setUp(self): method tearDown (line 274) | def tearDown(self): method test_introspect_ignore_views (line 278) | def test_introspect_ignore_views(self): method test_introspect_views (line 284) | def test_introspect_views(self): FILE: tests/pydantic_utils.py class User (line 18) | class User(TestModel): class Tweet (line 34) | class Tweet(TestModel): class NullableFK (line 40) | class NullableFK(TestModel): class AllTypes (line 45) | class AllTypes(TestModel): class BasePydanticTestCase (line 61) | class BasePydanticTestCase(ModelDatabaseTestCase): class TestPydanticConversion (line 65) | class TestPydanticConversion(BasePydanticTestCase): method test_conversion (line 66) | def test_conversion(self): method test_application (line 73) | def test_application(self): method test_autofield (line 101) | def test_autofield(self): method test_nullable (line 108) | def test_nullable(self): method test_defaults (line 118) | def test_defaults(self): method test_choices (line 126) | def test_choices(self): method test_metadata (line 136) | def test_metadata(self): method test_foreign_key (line 153) | def test_foreign_key(self): method test_type_mapping (line 165) | def test_type_mapping(self): method test_include_exclude (line 186) | def test_include_exclude(self): method test_nullable_fields (line 198) | def test_nullable_fields(self): method test_schema_generation (line 212) | def test_schema_generation(self): method test_validate_model (line 226) | def test_validate_model(self): method test_validate_model_foreign_key (line 254) | def test_validate_model_foreign_key(self): class TestRelationships (line 276) | class TestRelationships(BasePydanticTestCase): method test_nested_schema (line 277) | def test_nested_schema(self): method test_nested_relationship_in_json_schema (line 300) | def test_nested_relationship_in_json_schema(self): method test_nullable_fk_relationship (line 309) | def test_nullable_fk_relationship(self): method test_metadata_preserved_on_nested_field (line 326) | def test_metadata_preserved_on_nested_field(self): method test_backref (line 335) | def test_backref(self): method test_validate_fk (line 362) | def test_validate_fk(self): method test_validate_backref (line 392) | def test_validate_backref(self): FILE: tests/queries.py class TestQueryExecution (line 14) | class TestQueryExecution(DatabaseTestCase): method setUp (line 17) | def setUp(self): method tearDown (line 31) | def tearDown(self): method create_user_tweets (line 37) | def create_user_tweets(self, username, *tweets): method test_selection (line 45) | def test_selection(self): method test_select_peek_first (line 58) | def test_select_peek_first(self): method test_select_get (line 70) | def test_select_get(self): method test_select_count (line 76) | def test_select_count(self): method test_select_exists (line 92) | def test_select_exists(self): method test_scalar (line 97) | def test_scalar(self): method test_scalars (line 119) | def test_scalars(self): method test_slicing_select (line 131) | def test_slicing_select(self): class TestQueryCloning (line 151) | class TestQueryCloning(BaseTestCase): method test_clone_tables (line 152) | def test_clone_tables(self): method test_clone_models (line 155) | def test_clone_models(self): method _do_test_clone (line 165) | def _do_test_clone(self, User, Tweet): FILE: tests/reflection.py class ColTypes (line 22) | class ColTypes(TestModel): class Meta (line 37) | class Meta: class Nullable (line 44) | class Nullable(TestModel): class RelModel (line 49) | class RelModel(TestModel): class FKPK (line 54) | class FKPK(TestModel): class Underscores (line 58) | class Underscores(TestModel): class Category (line 63) | class Category(TestModel): class Nugget (line 68) | class Nugget(TestModel): class NoPK (line 73) | class NoPK(TestModel): class Meta (line 75) | class Meta: class BaseReflectionTestCase (line 79) | class BaseReflectionTestCase(ModelTestCase): method setUp (line 80) | def setUp(self): class TestReflection (line 85) | class TestReflection(BaseReflectionTestCase): method test_generate_models (line 89) | def test_generate_models(self): method test_generate_models_indexes (line 132) | def test_generate_models_indexes(self): method test_table_subset (line 151) | def test_table_subset(self): method test_sqlite_fk_re (line 159) | def test_sqlite_fk_re(self): method test_make_column_name (line 186) | def test_make_column_name(self): method test_make_model_name (line 224) | def test_make_model_name(self): method test_col_types (line 236) | def test_col_types(self): method test_foreign_keys (line 290) | def test_foreign_keys(self): method test_table_names (line 320) | def test_table_names(self): method test_column_meta (line 335) | def test_column_meta(self): method test_get_field (line 389) | def test_get_field(self): class TestReflectNoPK (line 454) | class TestReflectNoPK(BaseReflectionTestCase): method test_no_pk (line 457) | def test_no_pk(self): class EventLog (line 468) | class EventLog(TestModel): class DefaultVals (line 475) | class DefaultVals(TestModel): class Meta (line 479) | class Meta: class TestReflectDefaultValues (line 483) | class TestReflectDefaultValues(BaseReflectionTestCase): method test_default_values (line 487) | def test_default_values(self): method test_default_values_extended (line 508) | def test_default_values_extended(self): class TestReflectionDependencies (line 531) | class TestReflectionDependencies(BaseReflectionTestCase): method test_generate_dependencies (line 534) | def test_generate_dependencies(self): method test_ignore_backrefs (line 547) | def test_ignore_backrefs(self): class Note (line 552) | class Note(TestModel): class TestReflectViews (line 558) | class TestReflectViews(BaseReflectionTestCase): method setUp (line 561) | def setUp(self): method tearDown (line 567) | def tearDown(self): method test_views_ignored_default (line 571) | def test_views_ignored_default(self): method test_introspect_view (line 575) | def test_introspect_view(self): method test_introspect_view_integration (line 587) | def test_introspect_view_integration(self): class TestCyclicalFK (line 599) | class TestCyclicalFK(BaseReflectionTestCase): method setUp (line 600) | def setUp(self): method test_cyclical_fk (line 606) | def test_cyclical_fk(self): class Event (line 635) | class Event(TestModel): class TestInteractiveHelpers (line 641) | class TestInteractiveHelpers(ModelTestCase): method test_generate_models (line 644) | def test_generate_models(self): FILE: tests/regressions.py class ColAlias (line 33) | class ColAlias(TestModel): class CARef (line 37) | class CARef(TestModel): class TestQueryAliasToColumnName (line 42) | class TestQueryAliasToColumnName(ModelTestCase): method setUp (line 45) | def setUp(self): method test_alias_to_column_name (line 52) | def test_alias_to_column_name(self): method test_alias_overlap_with_join (line 66) | def test_alias_overlap_with_join(self): method test_cannot_alias_join_to_object_id_name (line 85) | def test_cannot_alias_join_to_object_id_name(self): class TestOverrideModelRepr (line 91) | class TestOverrideModelRepr(BaseTestCase): method test_custom_reprs (line 92) | def test_custom_reprs(self): class DiA (line 106) | class DiA(TestModel): class DiB (line 108) | class DiB(TestModel): class DiC (line 111) | class DiC(TestModel): class DiD (line 114) | class DiD(TestModel): class DiBA (line 117) | class DiBA(TestModel): class TestDeleteInstanceRegression (line 122) | class TestDeleteInstanceRegression(ModelTestCase): method test_delete_instance_regression (line 126) | def test_delete_instance_regression(self): class TestCountUnionRegression (line 175) | class TestCountUnionRegression(ModelTestCase): method test_count_union (line 178) | def test_count_union(self): class User2 (line 202) | class User2(TestModel): class Category2 (line 205) | class Category2(TestModel): class TestGithub1354 (line 211) | class TestGithub1354(ModelTestCase): method test_get_or_create_self_referential_fk2 (line 213) | def test_get_or_create_self_referential_fk2(self): class TestInsertFromSQL (line 224) | class TestInsertFromSQL(ModelTestCase): method setUp (line 225) | def setUp(self): method tearDown (line 233) | def tearDown(self): method test_insert_from_sql (line 238) | def test_insert_from_sql(self): class TestSubqueryFunctionCall (line 244) | class TestSubqueryFunctionCall(BaseTestCase): method test_subquery_function_call (line 245) | def test_subquery_function_call(self): class A (line 258) | class A(TestModel): class B (line 260) | class B(TestModel): class C (line 262) | class C(TestModel): class TestCrossJoin (line 267) | class TestCrossJoin(ModelTestCase): method setUp (line 270) | def setUp(self): method test_cross_join (line 279) | def test_cross_join(self): function _create_users_tweets (line 291) | def _create_users_tweets(db): class TestSubqueryInSelect (line 303) | class TestSubqueryInSelect(ModelTestCase): method setUp (line 306) | def setUp(self): method test_subquery_in_select (line 310) | def test_subquery_in_select(self): class TestReturningIntegrationRegressions (line 324) | class TestReturningIntegrationRegressions(ModelTestCase): method test_returning_integration_subqueries (line 327) | def test_returning_integration_subqueries(self): method test_returning_integration (line 356) | def test_returning_integration(self): class TestUpdateIntegrationRegressions (line 376) | class TestUpdateIntegrationRegressions(ModelTestCase): method setUp (line 379) | def setUp(self): method test_update_examples (line 386) | def test_update_examples(self): method test_update_examples_2 (line 426) | def test_update_examples_2(self): class TestSelectValueConversion (line 453) | class TestSelectValueConversion(ModelTestCase): method test_select_value_conversion (line 457) | def test_select_value_conversion(self): class ConflictDetectedException (line 470) | class ConflictDetectedException(Exception): pass class BaseVersionedModel (line 472) | class BaseVersionedModel(TestModel): method save_optimistic (line 475) | def save_optimistic(self): class VUser (line 507) | class VUser(BaseVersionedModel): class VTweet (line 510) | class VTweet(BaseVersionedModel): class TestOptimisticLockingDemo (line 515) | class TestOptimisticLockingDemo(ModelTestCase): method test_optimistic_locking (line 518) | def test_optimistic_locking(self): method test_optimistic_locking_populate_fks (line 542) | def test_optimistic_locking_populate_fks(self): class TS (line 556) | class TS(TestModel): class TestZeroTimestamp (line 561) | class TestZeroTimestamp(ModelTestCase): method test_zero_timestamp (line 564) | def test_zero_timestamp(self): class Player (line 576) | class Player(TestModel): class Game (line 579) | class Game(TestModel): class Score (line 583) | class Score(TestModel): class TestJoinSubqueryAggregateViaLeftOuter (line 588) | class TestJoinSubqueryAggregateViaLeftOuter(ModelTestCase): method test_join_subquery_aggregate_left_outer (line 591) | def test_join_subquery_aggregate_left_outer(self): class Project (line 631) | class Project(TestModel): class Task (line 634) | class Task(TestModel): class TestModelGraphMultiFK (line 640) | class TestModelGraphMultiFK(ModelTestCase): method test_model_graph_multi_fk (line 643) | def test_model_graph_multi_fk(self): class TestBlobFieldContextRegression (line 682) | class TestBlobFieldContextRegression(BaseTestCase): method test_blob_field_context_regression (line 683) | def test_blob_field_context_regression(self): class Product (line 695) | class Product(TestModel): class Meta (line 698) | class Meta: class Sku (line 701) | class Sku(TestModel): class Meta (line 705) | class Meta: method product (line 710) | def product(self): method product (line 717) | def product(self, obj): method product (line 723) | def product(cls): class TestFKCompositePK (line 727) | class TestFKCompositePK(ModelTestCase): method test_fk_composite_pk_regression (line 730) | def test_fk_composite_pk_regression(self): class RS (line 769) | class RS(TestModel): class RD (line 772) | class RD(TestModel): class RKV (line 777) | class RKV(TestModel): class Meta (line 781) | class Meta: class TestRegressionCountDistinct (line 785) | class TestRegressionCountDistinct(ModelTestCase): method test_regression_count_distinct (line 787) | def test_regression_count_distinct(self): method test_regression_count_distinct_cpk (line 811) | def test_regression_count_distinct_cpk(self): class TestReselectModelRegression (line 816) | class TestReselectModelRegression(ModelTestCase): method test_reselect_model_regression (line 819) | def test_reselect_model_regression(self): class TestJoinCorrelatedSubquery (line 832) | class TestJoinCorrelatedSubquery(ModelTestCase): method test_join_correlated_subquery (line 835) | def test_join_correlated_subquery(self): class RU (line 862) | class RU(TestModel): class Recipe (line 866) | class Recipe(TestModel): class TestMultiFKJoinRegression (line 872) | class TestMultiFKJoinRegression(ModelTestCase): method test_multi_fk_join_regression (line 875) | def test_multi_fk_join_regression(self): class TestCompoundExistsRegression (line 895) | class TestCompoundExistsRegression(ModelTestCase): method test_compound_regressions_1961 (line 898) | def test_compound_regressions_1961(self): class TestViewFieldMapping (line 910) | class TestViewFieldMapping(ModelTestCase): method tearDown (line 913) | def tearDown(self): method test_view_field_mapping (line 920) | def test_view_field_mapping(self): class TC (line 933) | class TC(TestModel): class TestTypeCoercion (line 940) | class TestTypeCoercion(ModelTestCase): method test_type_coercion (line 943) | def test_type_coercion(self): class TestLikeColumnValue (line 953) | class TestLikeColumnValue(ModelTestCase): method test_like_column_value (line 956) | def test_like_column_value(self): class TestUnionParenthesesRegression (line 984) | class TestUnionParenthesesRegression(ModelTestCase): method test_union_parentheses_regression (line 987) | def test_union_parentheses_regression(self): class NoPK (line 998) | class NoPK(TestModel): class Meta (line 1000) | class Meta: class TestNoPKHashRegression (line 1004) | class TestNoPKHashRegression(ModelTestCase): method test_no_pk_hash_regression (line 1007) | def test_no_pk_hash_regression(self): class Site (line 1017) | class Site(TestModel): class Page (line 1020) | class Page(TestModel): class PageItem (line 1024) | class PageItem(TestModel): class TestModelFilterJoinOrdering (line 1029) | class TestModelFilterJoinOrdering(ModelTestCase): method setUp (line 1032) | def setUp(self): method test_model_filter_join_ordering (line 1046) | def test_model_filter_join_ordering(self): class JsonField (line 1082) | class JsonField(TextField): method db_value (line 1083) | def db_value(self, value): method python_value (line 1085) | def python_value(self, value): class JM (line 1089) | class JM(TestModel): class TestListValueConversion (line 1094) | class TestListValueConversion(ModelTestCase): method test_list_value_conversion (line 1097) | def test_list_value_conversion(self): class TestCountSubqueryEquals (line 1122) | class TestCountSubqueryEquals(ModelTestCase): method test_count_subquery_equals (line 1125) | def test_count_subquery_equals(self): class BoolModel (line 1136) | class BoolModel(TestModel): class TestBooleanCompare (line 1141) | class TestBooleanCompare(ModelTestCase): method test_boolean_compare (line 1144) | def test_boolean_compare(self): class CPK (line 1158) | class CPK(TestModel): class CPKFK (line 1161) | class CPKFK(TestModel): class Meta (line 1164) | class Meta: class TestCompositePKwithFK (line 1168) | class TestCompositePKwithFK(ModelTestCase): method test_composite_pk_with_fk (line 1171) | def test_composite_pk_with_fk(self): class TestChainWhere (line 1187) | class TestChainWhere(ModelTestCase): method test_chain_where (line 1190) | def test_chain_where(self): class BCUser (line 1207) | class BCUser(TestModel): class BCTweet (line 1210) | class BCTweet(TestModel): class TestBulkCreateWithFK (line 1215) | class TestBulkCreateWithFK(ModelTestCase): method test_bulk_create_with_fk (line 1217) | def test_bulk_create_with_fk(self): method test_bulk_create_related_objects (line 1245) | def test_bulk_create_related_objects(self): class UUIDReg (line 1258) | class UUIDReg(TestModel): class CharPKKV (line 1262) | class CharPKKV(TestModel): class TestBulkUpdateNonIntegerPK (line 1268) | class TestBulkUpdateNonIntegerPK(ModelTestCase): method test_bulk_update_uuid_pk (line 1270) | def test_bulk_update_uuid_pk(self): method test_bulk_update_non_integer_pk (line 1282) | def test_bulk_update_non_integer_pk(self): class TestSaveClearingPK (line 1298) | class TestSaveClearingPK(ModelTestCase): method test_save_clear_pk (line 1301) | def test_save_clear_pk(self): class Bits (line 1313) | class Bits(TestModel): class TestBitFieldName (line 1323) | class TestBitFieldName(ModelTestCase): method assertBits (line 1326) | def assertBits(self, bf, expected): method test_bit_field_name (line 1333) | def test_bit_field_name(self): class FKMA (line 1353) | class FKMA(TestModel): class FKMB (line 1356) | class FKMB(TestModel): class TestFKMigrationRegression (line 1361) | class TestFKMigrationRegression(ModelTestCase): method test_fk_migration (line 1364) | def test_fk_migration(self): class ModelTypeField (line 1382) | class ModelTypeField(CharField): method db_value (line 1383) | def db_value(self, value): method python_value (line 1386) | def python_value(self, value): class MTF (line 1391) | class MTF(TestModel): class TestFieldValueRegression (line 1396) | class TestFieldValueRegression(ModelTestCase): method test_field_value_regression (line 1399) | def test_field_value_regression(self): class NLM (line 1407) | class NLM(TestModel): class TestRegressionNodeListClone (line 1411) | class TestRegressionNodeListClone(ModelTestCase): method test_node_list_clone_expr (line 1414) | def test_node_list_clone_expr(self): class LK (line 1424) | class LK(TestModel): class TestLikeEscape (line 1427) | class TestLikeEscape(ModelTestCase): method assertNames (line 1430) | def assertNames(self, expr, expected): method test_like_escape (line 1434) | def test_like_escape(self): method test_like_escape_backslash (line 1453) | def test_like_escape_backslash(self): class FKF_A (line 1466) | class FKF_A(TestModel): class FKF_B (line 1469) | class FKF_B(TestModel): class TestQueryWithModelInstanceParam (line 1474) | class TestQueryWithModelInstanceParam(ModelTestCase): method test_query_with_model_instance_param (line 1477) | def test_query_with_model_instance_param(self): class TestModelSelectFromSubquery (line 1512) | class TestModelSelectFromSubquery(ModelTestCase): method test_model_select_from_subquery (line 1515) | def test_model_select_from_subquery(self): class CharPK (line 1536) | class CharPK(TestModel): method __str__ (line 1540) | def __str__(self): class CharFK (line 1543) | class CharFK(TestModel): class TestModelConversionRegression (line 1548) | class TestModelConversionRegression(ModelTestCase): method test_model_conversion_regression (line 1551) | def test_model_conversion_regression(self): method test_model_conversion_fk_retained (line 1560) | def test_model_conversion_fk_retained(self): class FKN_A (line 1569) | class FKN_A(TestModel): pass class FKN_B (line 1570) | class FKN_B(TestModel): class TestSetFKNull (line 1573) | class TestSetFKNull(ModelTestCase): method test_set_fk_null (line 1576) | def test_set_fk_null(self): class TestWeirdAliases (line 1589) | class TestWeirdAliases(ModelTestCase): method test_weird_aliases (line 1593) | def test_weird_aliases(self): class NDF (line 1618) | class NDF(TestModel): class TestBulkUpdateAllNull (line 1622) | class TestBulkUpdateAllNull(ModelTestCase): method test_bulk_update_all_null (line 1626) | def test_bulk_update_all_null(self): class CQA (line 1636) | class CQA(TestModel): class TestSelectFromUnion (line 1641) | class TestSelectFromUnion(ModelTestCase): method test_select_from_union (line 1644) | def test_select_from_union(self): class DF (line 1657) | class DF(TestModel): class DFC (line 1660) | class DFC(TestModel): class DFGC (line 1664) | class DFGC(TestModel): class TestDjangoFilterRegression (line 1670) | class TestDjangoFilterRegression(ModelTestCase): method test_django_filter_regression (line 1673) | def test_django_filter_regression(self): class TestFunctionInfiniteLoop (line 1743) | class TestFunctionInfiniteLoop(BaseTestCase): method test_function_infinite_loop (line 1744) | def test_function_infinite_loop(self): class State (line 1748) | class State(TestModel): class Transition (line 1750) | class Transition(TestModel): class TestJoinTypePrefetchMultipleFKs (line 1754) | class TestJoinTypePrefetchMultipleFKs(ModelTestCase): method test_join_prefetch_multiple_fks (line 1757) | def test_join_prefetch_multiple_fks(self): class TestThreadSafetyDecorators (line 1785) | class TestThreadSafetyDecorators(ModelTestCase): method test_thread_safety_atomic (line 1788) | def test_thread_safety_atomic(self): class TestQueryCountList (line 1803) | class TestQueryCountList(ModelTestCase): method test_iteration_single_query (line 1806) | def test_iteration_single_query(self): class TestSumCaseSubquery (line 1821) | class TestSumCaseSubquery(ModelTestCase): method test_sum_case_subquery (line 1824) | def test_sum_case_subquery(self): class I (line 1833) | class I(TestModel): class S (line 1835) | class S(TestModel): class P (line 1837) | class P(TestModel): class PS (line 1839) | class PS(TestModel): class PP (line 1842) | class PP(TestModel): class O (line 1844) | class O(TestModel): class OX (line 1847) | class OX(TestModel): class Character (line 1850) | class Character(TestModel): class Shape (line 1852) | class Shape(TestModel): class ShapeDetail (line 1854) | class ShapeDetail(TestModel): class TestDeleteInstanceDFS (line 1857) | class TestDeleteInstanceDFS(ModelTestCase): method test_delete_instance_dfs_nullable (line 1859) | def test_delete_instance_dfs_nullable(self): method test_delete_instance_dfs (line 1891) | def test_delete_instance_dfs(self): class IMC (line 1938) | class IMC(TestModel): class TestChunkedInsertMany (line 1942) | class TestChunkedInsertMany(ModelTestCase): method test_chunked_insert_many (line 1945) | def test_chunked_insert_many(self): class TestThreadSafeMetaRegression (line 1963) | class TestThreadSafeMetaRegression(ModelTestCase): method test_thread_safe_meta (line 1964) | def test_thread_safe_meta(self): FILE: tests/results.py function lange (line 10) | def lange(x, y=None): class TestCursorWrapper (line 18) | class TestCursorWrapper(ModelTestCase): method test_iteration (line 22) | def test_iteration(self): method test_count (line 42) | def test_count(self): method test_nested_iteration (line 57) | def test_nested_iteration(self): method test_iterator_protocol (line 71) | def test_iterator_protocol(self): method test_iterator (line 89) | def test_iterator(self): method test_query_iterator (line 103) | def test_query_iterator(self): method test_row_cache (line 114) | def test_row_cache(self): class TestRowTypes (line 139) | class TestRowTypes(ModelTestCase): method make_query (line 143) | def make_query(self, *exprs): method test_namedtuples (line 154) | def test_namedtuples(self): method test_dicts (line 189) | def test_dicts(self): method test_dicts_flat (line 221) | def test_dicts_flat(self): method test_model_objects (line 238) | def test_model_objects(self): method test_model_objects_flat (line 267) | def test_model_objects_flat(self): method test_models (line 284) | def test_models(self): class Reg (line 304) | class Reg(TestModel): class TestSpecifyConverter (line 308) | class TestSpecifyConverter(ModelTestCase): method test_specify_converter (line 311) | def test_specify_converter(self): FILE: tests/returning.py class Reg (line 13) | class Reg(TestModel): class Meta (line 17) | class Meta: class TestReturningIntegration (line 28) | class TestReturningIntegration(ModelTestCase): method test_crud (line 31) | def test_crud(self): method test_returning_expression (line 60) | def test_returning_expression(self): method test_returning_types (line 78) | def test_returning_types(self): FILE: tests/schema.py class TMUnique (line 20) | class TMUnique(TestModel): class TMSequence (line 24) | class TMSequence(TestModel): class TMIndexes (line 28) | class TMIndexes(TestModel): class Meta (line 33) | class Meta: class TMConstraints (line 39) | class TMConstraints(TestModel): class TMNamedConstraints (line 45) | class TMNamedConstraints(TestModel): class Meta (line 49) | class Meta: class CacheData (line 53) | class CacheData(TestModel): class Meta (line 57) | class Meta: class Article (line 61) | class Article(TestModel): class TestModelDDL (line 77) | class TestModelDDL(ModelDatabaseTestCase): method test_database_required (line 83) | def test_database_required(self): method assertCreateTable (line 89) | def assertCreateTable(self, model_class, expected): method assertIndexes (line 101) | def assertIndexes(self, model_class, expected): method test_model_fk_schema (line 108) | def test_model_fk_schema(self): method test_bigauto_and_fk (line 131) | def test_bigauto_and_fk(self): method test_model_indexes_with_schema (line 151) | def test_model_indexes_with_schema(self): method test_model_indexes (line 186) | def test_model_indexes(self): method test_model_index_types (line 197) | def test_model_index_types(self): method test_model_indexes_custom_tablename (line 215) | def test_model_indexes_custom_tablename(self): method test_model_indexes_computed_columns (line 232) | def test_model_indexes_computed_columns(self): method test_model_indexes_complex_columns (line 247) | def test_model_indexes_complex_columns(self): method test_legacy_model_table_and_indexes (line 266) | def test_legacy_model_table_and_indexes(self): method test_without_pk (line 311) | def test_without_pk(self): method test_without_rowid (line 320) | def test_without_rowid(self): method test_strict_tables (line 342) | def test_strict_tables(self): method test_without_rowid_strict (line 364) | def test_without_rowid_strict(self): method test_table_name (line 382) | def test_table_name(self): method test_temporary_table (line 401) | def test_temporary_table(self): method test_model_temporary_table (line 408) | def test_model_temporary_table(self): method test_drop_table (line 423) | def test_drop_table(self): method test_table_constraints (line 433) | def test_table_constraints(self): method test_table_settings (line 454) | def test_table_settings(self): method test_table_options (line 471) | def test_table_options(self): method test_table_and_index_creation (line 486) | def test_table_and_index_creation(self): method test_index_name_truncation (line 572) | def test_index_name_truncation(self): method test_fk_non_pk_ddl (line 593) | def test_fk_non_pk_ddl(self): method test_deferred_foreign_key (line 628) | def test_deferred_foreign_key(self): method test_deferred_foreign_key_inheritance (line 694) | def test_deferred_foreign_key_inheritance(self): method test_identity_field (line 722) | def test_identity_field(self): method test_self_fk_inheritance (line 735) | def test_self_fk_inheritance(self): method test_field_ddl (line 765) | def test_field_ddl(self): class NoteX (line 799) | class NoteX(TestModel): class TestCreateAs (line 806) | class TestCreateAs(ModelTestCase): method setUp (line 815) | def setUp(self): method tearDown (line 820) | def tearDown(self): method test_create_as (line 827) | def test_create_as(self): class TestModelSetTableName (line 854) | class TestModelSetTableName(BaseTestCase): method test_set_table_name (line 855) | def test_set_table_name(self): class TestTruncateTable (line 871) | class TestTruncateTable(ModelTestCase): method test_truncate_table (line 874) | def test_truncate_table(self): class TestNamedConstraintsIntegration (line 889) | class TestNamedConstraintsIntegration(ModelTestCase): method setUp (line 892) | def setUp(self): method test_named_constraints_integration (line 897) | def test_named_constraints_integration(self): class TMKV (line 912) | class TMKV(TestModel): class TMKVNew (line 917) | class TMKVNew(TestModel): class Meta (line 920) | class Meta: class TestCreateTableAsSQL (line 925) | class TestCreateTableAsSQL(ModelDatabaseTestCase): method test_create_table_as_sql (line 929) | def test_create_table_as_sql(self): class TestCreateTableAs (line 946) | class TestCreateTableAs(ModelTestCase): method tearDown (line 949) | def tearDown(self): method test_create_table_as (line 956) | def test_create_table_as(self): FILE: tests/shortcuts.py class User (line 17) | class User(TestModel): method name_hash (line 21) | def name_hash(self): class Tweet (line 24) | class Tweet(TestModel): class Tag (line 28) | class Tag(TestModel): class TweetTag (line 31) | class TweetTag(TestModel): class Meta (line 35) | class Meta: class Owner (line 38) | class Owner(TestModel): class Label (line 41) | class Label(TestModel): class Gallery (line 44) | class Gallery(TestModel): class Student (line 51) | class Student(TestModel): class Course (line 56) | class Course(TestModel): class StudentCourse (line 61) | class StudentCourse(TestModel): class Host (line 67) | class Host(TestModel): class Service (line 70) | class Service(TestModel): class Device (line 74) | class Device(TestModel): class Basket (line 78) | class Basket(TestModel): class Item (line 81) | class Item(TestModel): class NodeTag (line 86) | class NodeTag(TestModel): class Node (line 89) | class Node(TestModel): class TestModelToDict (line 95) | class TestModelToDict(ModelTestCase): method setUp (line 99) | def setUp(self): method test_self_referential (line 104) | def test_self_referential(self): method test_simple (line 141) | def test_simple(self): method test_simple_recurse (line 147) | def test_simple_recurse(self): method test_simple_backref (line 163) | def test_simple_backref(self): method test_recurse_and_backrefs (line 180) | def test_recurse_and_backrefs(self): method test_recursive_fk (line 190) | def test_recursive_fk(self): method test_manytomany (line 224) | def test_manytomany(self): method test_manytomany_field (line 244) | def test_manytomany_field(self): method test_manytomany_deferred (line 282) | def test_manytomany_deferred(self): method test_recurse_max_depth (line 330) | def test_recurse_max_depth(self): method test_only (line 382) | def test_only(self): method test_exclude (line 404) | def test_exclude(self): method test_extra_attrs (line 424) | def test_extra_attrs(self): method test_fields_from_query (line 436) | def test_fields_from_query(self): method test_fields_from_query_alias (line 475) | def test_fields_from_query_alias(self): method test_only_backref (line 487) | def test_only_backref(self): method test_model_to_dict_disabled_backref (line 505) | def test_model_to_dict_disabled_backref(self): method test_empty_vs_null_fk (line 519) | def test_empty_vs_null_fk(self): class TestDictToModel (line 530) | class TestDictToModel(ModelTestCase): method setUp (line 534) | def setUp(self): method test_simple (line 538) | def test_simple(self): method test_update_model_from_dict (line 545) | def test_update_model_from_dict(self): method test_related (line 558) | def test_related(self): method test_backrefs (line 581) | def test_backrefs(self): method test_unknown_attributes (line 605) | def test_unknown_attributes(self): method test_ignore_id_attribute (line 615) | def test_ignore_id_attribute(self): class ReconnectMySQLDatabase (line 638) | class ReconnectMySQLDatabase(ReconnectMixin, MySQLDatabase): method cursor (line 639) | def cursor(self, named_cursor=None): method close (line 650) | def close(self): method _reset_mock (line 654) | def _reset_mock(self): class TestReconnectMixin (line 660) | class TestReconnectMixin(DatabaseTestCase): method test_reconnect_mixin_execute_sql (line 663) | def test_reconnect_mixin_execute_sql(self): method test_reconnect_mixin_begin (line 687) | def test_reconnect_mixin_begin(self): class MMA (line 721) | class MMA(TestModel): class MMB (line 725) | class MMB(TestModel): class MMC (line 728) | class MMC(TestModel): class TestResolveMultiModelQuery (line 734) | class TestResolveMultiModelQuery(ModelTestCase): method test_resolve_multimodel_query (line 737) | def test_resolve_multimodel_query(self): class TSBase (line 762) | class TSBase(Model): class Meta (line 763) | class Meta: class TSReg (line 767) | class TSReg(TSBase): class TestThreadSafeDatabaseMetadata (line 770) | class TestThreadSafeDatabaseMetadata(BaseTestCase): method setUp (line 771) | def setUp(self): method test_threadsafe_database_metadata (line 775) | def test_threadsafe_database_metadata(self): method test_swap_database (line 783) | def test_swap_database(self): method test_preserve_original_db (line 808) | def test_preserve_original_db(self): class TIW (line 835) | class TIW(TestModel): class TestInsertWhere (line 841) | class TestInsertWhere(ModelTestCase): method test_insert_where (line 844) | def test_insert_where(self): method test_insert_where_defaults (line 864) | def test_insert_where_defaults(self): FILE: tests/signals.py class BaseSignalModel (line 8) | class BaseSignalModel(signals.Model): class A (line 11) | class A(BaseSignalModel): class B (line 14) | class B(BaseSignalModel): class SubB (line 17) | class SubB(B): pass class TestSignals (line 20) | class TestSignals(ModelTestCase): method tearDown (line 24) | def tearDown(self): method test_pre_save (line 32) | def test_pre_save(self): method test_post_save (line 47) | def test_post_save(self): method test_pre_delete (line 62) | def test_pre_delete(self): method test_post_delete (line 72) | def test_post_delete(self): method test_pre_init (line 82) | def test_pre_init(self): method test_sender (line 93) | def test_sender(self): method test_connect_disconnect (line 106) | def test_connect_disconnect(self): method test_function_reuse (line 136) | def test_function_reuse(self): method test_subclass_instance_receive_signals (line 150) | def test_subclass_instance_receive_signals(self): method test_disconnect_issue_2687 (line 160) | def test_disconnect_issue_2687(self): class NoPK (line 199) | class NoPK(BaseSignalModel): class Meta (line 201) | class Meta: class TestSaveNoPrimaryKey (line 205) | class TestSaveNoPrimaryKey(ModelTestCase): method test_save_no_pk (line 209) | def test_save_no_pk(self): FILE: tests/sql.py class TestSelectQuery (line 23) | class TestSelectQuery(BaseTestCase): method test_select (line 24) | def test_select(self): method test_select_extend (line 41) | def test_select_extend(self): method test_selected_columns (line 56) | def test_selected_columns(self): method test_select_explicit_columns (line 79) | def test_select_explicit_columns(self): method test_select_in_list_of_values (line 88) | def test_select_in_list_of_values(self): method test_select_subselect_function (line 115) | def test_select_subselect_function(self): method test_subquery_in_select_sql (line 140) | def test_subquery_in_select_sql(self): method test_subquery_in_select_expression_sql (line 158) | def test_subquery_in_select_expression_sql(self): method test_star (line 173) | def test_star(self): method test_from_clause (line 193) | def test_from_clause(self): method test_from_query (line 205) | def test_from_query(self): method test_join_explicit_columns (line 225) | def test_join_explicit_columns(self): method test_multi_join (line 238) | def test_multi_join(self): method test_correlated_subquery (line 257) | def test_correlated_subquery(self): method test_multiple_where (line 273) | def test_multiple_where(self): method test_orwhere (line 285) | def test_orwhere(self): method test_limit (line 296) | def test_limit(self): method test_simple_join (line 319) | def test_simple_join(self): method test_subquery (line 333) | def test_subquery(self): method test_subquery_in_expr (line 347) | def test_subquery_in_expr(self): method test_user_defined_alias (line 359) | def test_user_defined_alias(self): method test_simple_cte (line 371) | def test_simple_cte(self): method test_two_ctes (line 382) | def test_two_ctes(self): method test_select_from_cte (line 398) | def test_select_from_cte(self): method test_cte_select_from_2 (line 421) | def test_cte_select_from_2(self): method test_cte_select_from_with_aggregate (line 433) | def test_cte_select_from_with_aggregate(self): method test_two_ctes_with_join (line 454) | def test_two_ctes_with_join(self): method test_materialize_cte (line 481) | def test_materialize_cte(self): method test_fibonacci_cte (line 497) | def test_fibonacci_cte(self): method test_cte_with_count (line 525) | def test_cte_with_count(self): method test_cte_subquery_in_expression (line 539) | def test_cte_subquery_in_expression(self): method test_multi_update_cte (line 562) | def test_multi_update_cte(self): method test_data_modifying_cte_delete (line 580) | def test_data_modifying_cte_delete(self): method test_data_modifying_cte_update (line 632) | def test_data_modifying_cte_update(self): method test_data_modifying_cte_insert (line 662) | def test_data_modifying_cte_insert(self): method test_select_from_subquery (line 690) | def test_select_from_subquery(self): method test_complex_select (line 708) | def test_complex_select(self): method test_compound_select (line 763) | def test_compound_select(self): method test_compound_operations (line 783) | def test_compound_operations(self): method test_compound_parentheses_handling (line 811) | def test_compound_parentheses_handling(self): method test_compound_select_order_limit (line 872) | def test_compound_select_order_limit(self): method test_compound_select_as_subquery (line 895) | def test_compound_select_as_subquery(self): method test_union_with_order_and_limit (line 912) | def test_union_with_order_and_limit(self): method test_intersect (line 924) | def test_intersect(self): method test_except (line 935) | def test_except(self): method test_coalesce (line 945) | def test_coalesce(self): method test_nullif (line 955) | def test_nullif(self): method test_join_on_query (line 963) | def test_join_on_query(self): method test_join_on_misc (line 973) | def test_join_on_misc(self): method test_lateral_subquery_model (line 981) | def test_lateral_subquery_model(self): method test_all_clauses (line 999) | def test_all_clauses(self): method test_order_by_collate (line 1019) | def test_order_by_collate(self): method test_order_by_nulls (line 1027) | def test_order_by_nulls(self): method test_in_value_representation (line 1050) | def test_in_value_representation(self): method test_tuple_comparison (line 1058) | def test_tuple_comparison(self): method test_tuple_comparison_subquery (line 1073) | def test_tuple_comparison_subquery(self): method test_tuple_in_subquery (line 1088) | def test_tuple_in_subquery(self): method test_empty_in (line 1103) | def test_empty_in(self): method test_add_custom_op (line 1119) | def test_add_custom_op(self): method test_where_convert_to_is_null (line 1131) | def test_where_convert_to_is_null(self): method test_like_escape (line 1138) | def test_like_escape(self): method test_like_expr (line 1168) | def test_like_expr(self): method test_field_ops (line 1179) | def test_field_ops(self): method test_bitwise_ops (line 1190) | def test_bitwise_ops(self): method test_entity_escaping (line 1201) | def test_entity_escaping(self): class TestInsertQuery (line 1213) | class TestInsertQuery(BaseTestCase): method test_insert_simple (line 1214) | def test_insert_simple(self): method test_replace_sqlite (line 1224) | def test_replace_sqlite(self): method test_replace_mysql (line 1233) | def test_replace_mysql(self): method test_insert_list (line 1241) | def test_insert_list(self): method test_insert_list_with_columns (line 1251) | def test_insert_list_with_columns(self): method test_insert_list_infer_columns (line 1264) | def test_insert_list_infer_columns(self): method test_insert_query (line 1284) | def test_insert_query(self): method test_insert_query_cte (line 1292) | def test_insert_query_cte(self): method test_insert_single_value_query (line 1301) | def test_insert_single_value_query(self): method test_insert_returning (line 1311) | def test_insert_returning(self): method test_insert_returning_expression (line 1330) | def test_insert_returning_expression(self): method test_empty (line 1341) | def test_empty(self): class TestUpdateQuery (line 1353) | class TestUpdateQuery(BaseTestCase): method test_update_query (line 1354) | def test_update_query(self): method test_update_subquery (line 1368) | def test_update_subquery(self): method test_update_value_subquery (line 1392) | def test_update_value_subquery(self): method test_update_from (line 1405) | def test_update_from(self): method test_update_from_subquery (line 1428) | def test_update_from_subquery(self): method test_update_returning (line 1449) | def test_update_returning(self): class TestDeleteQuery (line 1465) | class TestDeleteQuery(BaseTestCase): method test_delete_query (line 1466) | def test_delete_query(self): method test_delete_subquery (line 1475) | def test_delete_subquery(self): method test_delete_cte (line 1494) | def test_delete_cte(self): method test_delete_returning (line 1509) | def test_delete_returning(self): class TestWindowFunctions (line 1535) | class TestWindowFunctions(BaseTestCase): method test_partition_unordered (line 1536) | def test_partition_unordered(self): method test_ordered_unpartitioned (line 1549) | def test_ordered_unpartitioned(self): method test_ordered_partitioned (line 1558) | def test_ordered_partitioned(self): method test_empty_over (line 1569) | def test_empty_over(self): method test_frame (line 1578) | def test_frame(self): method test_frame_types (line 1605) | def test_frame_types(self): method test_running_total (line 1674) | def test_running_total(self): method test_named_window (line 1699) | def test_named_window(self): method test_multiple_windows (line 1729) | def test_multiple_windows(self): method test_alias_window (line 1745) | def test_alias_window(self): method test_reuse_window (line 1757) | def test_reuse_window(self): method test_filter_clause (line 1778) | def test_filter_clause(self): method test_window_in_orderby (line 1792) | def test_window_in_orderby(self): method test_window_extends (line 1813) | def test_window_extends(self): method test_window_ranged (line 1836) | def test_window_ranged(self): method test_window_frametypes (line 1873) | def test_window_frametypes(self): method test_window_frame_exclusion (line 1891) | def test_window_frame_exclusion(self): method test_filter_window (line 1909) | def test_filter_window(self): class TestValuesList (line 1931) | class TestValuesList(BaseTestCase): method test_values_list (line 1934) | def test_values_list(self): method test_values_list_named_columns (line 1942) | def test_values_list_named_columns(self): method test_named_values_list (line 1952) | def test_named_values_list(self): method test_docs_examples (line 1962) | def test_docs_examples(self): method test_join_on_valueslist (line 1981) | def test_join_on_valueslist(self): class TestCaseFunction (line 1994) | class TestCaseFunction(BaseTestCase): method test_case_function (line 1995) | def test_case_function(self): method test_multiple_case_expressions (line 2020) | def test_multiple_case_expressions(self): method test_case_subquery (line 2040) | def test_case_subquery(self): class TestSelectFeatures (line 2065) | class TestSelectFeatures(BaseTestCase): method test_reselect (line 2066) | def test_reselect(self): method test_distinct_on (line 2075) | def test_distinct_on(self): method test_distinct (line 2095) | def test_distinct(self): method test_distinct_count (line 2100) | def test_distinct_count(self): method test_filtered_count (line 2105) | def test_filtered_count(self): method test_ordered_aggregate (line 2114) | def test_ordered_aggregate(self): method test_for_update (line 2137) | def test_for_update(self): method test_for_update_nested (line 2155) | def test_for_update_nested(self): method test_for_update_options (line 2168) | def test_for_update_options(self): method test_parentheses (line 2201) | def test_parentheses(self): class TestExpressionSQL (line 2222) | class TestExpressionSQL(BaseTestCase): method test_parentheses_functions (line 2223) | def test_parentheses_functions(self): class TestOnConflictSqlite (line 2235) | class TestOnConflictSqlite(BaseTestCase): method test_replace (line 2238) | def test_replace(self): method test_ignore (line 2243) | def test_ignore(self): method test_update_not_supported (line 2248) | def test_update_not_supported(self): class TestOnConflictMySQL (line 2256) | class TestOnConflictMySQL(BaseTestCase): method setUp (line 2259) | def setUp(self): method test_replace (line 2263) | def test_replace(self): method test_ignore (line 2268) | def test_ignore(self): method test_update (line 2273) | def test_update(self): method test_update_use_value_mariadb (line 2294) | def test_update_use_value_mariadb(self): method test_where_not_supported (line 2312) | def test_where_not_supported(self): class TestOnConflictPostgresql (line 2320) | class TestOnConflictPostgresql(BaseTestCase): method test_ignore (line 2323) | def test_ignore(self): method test_conflict_target_required (line 2329) | def test_conflict_target_required(self): method test_conflict_resolution_required (line 2334) | def test_conflict_resolution_required(self): method test_conflict_update_excluded (line 2339) | def test_conflict_update_excluded(self): method test_conflict_target_or_constraint (line 2352) | def test_conflict_target_or_constraint(self): method test_update (line 2376) | def test_update(self): method test_conflict_target_partial_index (line 2415) | def test_conflict_target_partial_index(self): class TestIndex (line 2439) | class TestIndex(BaseTestCase): method test_simple_index (line 2440) | def test_simple_index(self): method test_advanced_index (line 2450) | def test_advanced_index(self): method test_str_cols (line 2472) | def test_str_cols(self): class TestSqlToString (line 2478) | class TestSqlToString(BaseTestCase): method _test_sql_to_string (line 2479) | def _test_sql_to_string(self, _param): method test_sql_to_string_qmark (line 2512) | def test_sql_to_string_qmark(self): method test_sql_to_string_default (line 2515) | def test_sql_to_string_default(self): FILE: tests/sqlcipher_ext.py function shazam (line 23) | def shazam(s): class Thing (line 27) | class Thing(TestModel): class FTSNote (line 31) | class FTSNote(FTSModel, TestModel): class Note (line 35) | class Note(TestModel): class CleanUpModelTestCase (line 40) | class CleanUpModelTestCase(ModelTestCase): method tearDown (line 41) | def tearDown(self): class SqlCipherTestCase (line 47) | class SqlCipherTestCase(CleanUpModelTestCase): method test_good_and_bad_passphrases (line 51) | def test_good_and_bad_passphrases(self): method test_rekey (line 64) | def test_rekey(self): method test_empty_passphrase (line 88) | def test_empty_passphrase(self): class TestSqlCipherConfiguration (line 108) | class TestSqlCipherConfiguration(CleanUpModelTestCase): method test_configuration_via_pragma (line 111) | def test_configuration_via_pragma(self): class SqlCipherExtTestCase (line 122) | class SqlCipherExtTestCase(CleanUpModelTestCase): method setUp (line 126) | def setUp(self): method tearDown (line 132) | def tearDown(self): method test_fts (line 136) | def test_fts(self): method test_func (line 161) | def test_func(self): FILE: tests/sqlite.py class WeightedAverage (line 40) | class WeightedAverage(object): method __init__ (line 41) | def __init__(self): method step (line 45) | def step(self, value, weight=None): method finalize (line 50) | def finalize(self): function _cmp (line 55) | def _cmp(l, r): function collate_reverse (line 60) | def collate_reverse(s1, s2): function collate_case_insensitive (line 64) | def collate_case_insensitive(s1, s2): function title_case (line 67) | def title_case(s): return s.title() function rstrip (line 70) | def rstrip(s, n): class Post (line 79) | class Post(TestModel): class ContentPost (line 83) | class ContentPost(FTSModel, Post): class Meta (line 84) | class Meta: class ContentPostMessage (line 90) | class ContentPostMessage(FTSModel, TestModel): class Meta (line 92) | class Meta: class Document (line 96) | class Document(FTSModel, TestModel): class Meta (line 98) | class Meta: class MultiColumn (line 102) | class MultiColumn(FTSModel, TestModel): class Meta (line 107) | class Meta: class RowIDModel (line 111) | class RowIDModel(TestModel): class KeyData (line 116) | class KeyData(TestModel): class JBData (line 120) | class JBData(TestModel): class Values (line 125) | class Values(TestModel): class FTS5Test (line 131) | class FTS5Test(FTS5Model): class Meta (line 136) | class Meta: class FTS5Document (line 140) | class FTS5Document(FTS5Model): class Meta (line 142) | class Meta: class DT (line 146) | class DT(TestModel): class TestJSONField (line 153) | class TestJSONField(ModelTestCase): method test_schema (line 157) | def test_schema(self): method test_create_read_update (line 164) | def test_create_read_update(self): method test_json_unicode (line 202) | def test_json_unicode(self): method test_json_to_json (line 214) | def test_json_to_json(self): method test_json_bulk_update_top_level_list (line 225) | def test_json_bulk_update_top_level_list(self): method test_json_bulk_update_top_level_dict (line 237) | def test_json_bulk_update_top_level_dict(self): method test_json_multi_ops (line 249) | def test_json_multi_ops(self): method test_select_json_value (line 282) | def test_select_json_value(self): class TestJSONFieldFunctions (line 310) | class TestJSONFieldFunctions(ModelTestCase): method setUp (line 322) | def setUp(self): method assertRows (line 331) | def assertRows(self, where, expected): method assertData (line 334) | def assertData(self, key, expected): method test_json_group_functions (line 338) | def test_json_group_functions(self): method test_extract (line 388) | def test_extract(self): method test_extract_text_json (line 397) | def test_extract_text_json(self): method test_extract_multiple (line 411) | def test_extract_multiple(self): method test_insert (line 423) | def test_insert(self): method test_insert_json (line 436) | def test_insert_json(self): method test_replace (line 449) | def test_replace(self): method test_replace_json (line 461) | def test_replace_json(self): method test_set (line 473) | def test_set(self): method test_set_json (line 483) | def test_set_json(self): method test_append (line 495) | def test_append(self): method test_update (line 533) | def test_update(self): method test_update_with_removal (line 546) | def test_update_with_removal(self): method test_update_nested (line 557) | def test_update_nested(self): method test_updated_nested_with_removal (line 570) | def test_updated_nested_with_removal(self): method test_remove (line 581) | def test_remove(self): method test_simple_update (line 597) | def test_simple_update(self): method test_children (line 606) | def test_children(self): method test_tree (line 621) | def test_tree(self): class TestJSONBFieldFunctions (line 638) | class TestJSONBFieldFunctions(TestJSONFieldFunctions): method assertData (line 642) | def assertData(self, key, expected): method test_extract_multiple (line 646) | def test_extract_multiple(self): class TestSqliteExtensions (line 660) | class TestSqliteExtensions(BaseTestCase): method test_virtual_model (line 661) | def test_virtual_model(self): method test_autoincrement_field (line 685) | def test_autoincrement_field(self): class BaseFTSTestCase (line 698) | class BaseFTSTestCase(object): method assertMessages (line 717) | def assertMessages(self, query, indexes): class TestFullTextSearch (line 722) | class TestFullTextSearch(BaseFTSTestCase, ModelTestCase): method test_fts_insert_or_replace (line 732) | def test_fts_insert_or_replace(self): method test_fts_manual (line 752) | def test_fts_manual(self): method test_fts_delete_row (line 791) | def test_fts_delete_row(self): method _create_multi_column (line 829) | def _create_multi_column(self): method test_fts_multi_column (line 834) | def test_fts_multi_column(self): method test_bm25 (line 861) | def test_bm25(self): method test_bm25_alt_corpus (line 903) | def test_bm25_alt_corpus(self): method _test_fts_auto (line 922) | def _test_fts_auto(self, ModelClass): method test_fts_auto_model (line 976) | def test_fts_auto_model(self): method test_fts_auto_field (line 979) | def test_fts_auto_field(self): method test_weighting (line 982) | def test_weighting(self): method test_fts_match_single_column (line 1021) | def test_fts_match_single_column(self): method test_fts_score_single_column (line 1045) | def test_fts_score_single_column(self): method test_match_column_queries (line 1077) | def test_match_column_queries(self): class TestFullTextSearchCython (line 1145) | class TestFullTextSearchCython(TestFullTextSearch): method test_bm25f (line 1146) | def test_bm25f(self): method test_lucene (line 1167) | def test_lucene(self): class TestFTS5 (line 1193) | class TestFTS5(BaseFTSTestCase, ModelTestCase): method setUp (line 1202) | def setUp(self): method test_create_table (line 1207) | def test_create_table(self): method test_custom_fts5_command (line 1213) | def test_custom_fts5_command(self): method test_create_table_options (line 1226) | def test_create_table_options(self): method assertResults (line 1247) | def assertResults(self, query, expected, scores=False, alias='score'): method test_search (line 1255) | def test_search(self): method test_fts_manual (line 1267) | def test_fts_manual(self): method test_match_column_queries (line 1301) | def test_match_column_queries(self): method test_highlight_function (line 1369) | def test_highlight_function(self): method test_snippet_function (line 1382) | def test_snippet_function(self): method test_clean_query (line 1391) | def test_clean_query(self): class TestUserDefinedCallbacks (line 1407) | class TestUserDefinedCallbacks(ModelTestCase): method test_custom_agg (line 1411) | def test_custom_agg(self): method test_custom_collation (line 1447) | def test_custom_collation(self): method test_collation_decorator (line 1454) | def test_collation_decorator(self): method test_custom_function (line 1464) | def test_custom_function(self): method test_function_decorator (line 1477) | def test_function_decorator(self): method test_use_across_connections (line 1487) | def test_use_across_connections(self): class TestRowIDField (line 1498) | class TestRowIDField(ModelTestCase): method test_model_meta (line 1502) | def test_model_meta(self): method test_rowid_field (line 1507) | def test_rowid_field(self): method test_insert_with_rowid (line 1529) | def test_insert_with_rowid(self): method test_insert_many_with_rowid_without_field_validation (line 1533) | def test_insert_many_with_rowid_without_field_validation(self): method test_insert_many_with_rowid_with_field_validation (line 1537) | def test_insert_many_with_rowid_with_field_validation(self): class CalendarMonth (line 1542) | class CalendarMonth(TestModel): class CalendarDay (line 1546) | class CalendarDay(TestModel): class TestIntWhereChain (line 1551) | class TestIntWhereChain(ModelTestCase): method test_int_where_chain (line 1555) | def test_int_where_chain(self): class Datum (line 1583) | class Datum(TestModel): class TestCollatedFieldDefinitions (line 1590) | class TestCollatedFieldDefinitions(ModelTestCase): method test_collated_fields (line 1594) | def test_collated_fields(self): class TestReadOnly (line 1647) | class TestReadOnly(ModelTestCase): method test_read_only (line 1651) | def test_read_only(self): class TDecModel (line 1667) | class TDecModel(TestModel): class TestTDecimalField (line 1671) | class TestTDecimalField(ModelTestCase): method test_tdecimal_field (line 1675) | def test_tdecimal_field(self): class KVR (line 1689) | class KVR(TestModel): class TestSqliteReturning (line 1695) | class TestSqliteReturning(ModelTestCase): method test_sqlite_returning (line 1699) | def test_sqlite_returning(self): method test_sqlite_on_conflict_returning (line 1723) | def test_sqlite_on_conflict_returning(self): method test_text_pk (line 1742) | def test_text_pk(self): class TestSqliteReturningConfig (line 1780) | class TestSqliteReturningConfig(ModelTestCase): method test_pk_set_properly (line 1784) | def test_pk_set_properly(self): method test_insert_behavior (line 1791) | def test_insert_behavior(self): method test_insert_on_conflict (line 1815) | def test_insert_on_conflict(self): method test_update_delete_rowcounts (line 1834) | def test_update_delete_rowcounts(self): method test_update_delete_explicit_returning (line 1854) | def test_update_delete_explicit_returning(self): method test_bulk_create_update (line 1885) | def test_bulk_create_update(self): method test_fk_set_correctly (line 1905) | def test_fk_set_correctly(self): class TestDeterministicFunction (line 1915) | class TestDeterministicFunction(ModelTestCase): method test_deterministic (line 1918) | def test_deterministic(self): class TestISODateTimeField (line 1939) | class TestISODateTimeField(ModelTestCase): method test_aware_datetimes (line 1943) | def test_aware_datetimes(self): FILE: tests/sqlite_changelog.py class Person (line 17) | class Person(TestModel): class Note (line 22) | class Note(TestModel): class CT1 (line 29) | class CT1(TestModel): class CT2 (line 36) | class CT2(TestModel): class TestChangeLog (line 45) | class TestChangeLog(ModelTestCase): method setUp (line 49) | def setUp(self): method assertChanges (line 55) | def assertChanges(self, changes, last_index=None): method test_changelog (line 65) | def test_changelog(self): method test_changelog_details (line 129) | def test_changelog_details(self): method test_changelog_jsonfield (line 153) | def test_changelog_jsonfield(self): FILE: tests/sqlite_helpers.py function json_installed (line 4) | def json_installed(): function json_patch_installed (line 17) | def json_patch_installed(): function json_text_installed (line 21) | def json_text_installed(): function jsonb_installed (line 24) | def jsonb_installed(): function compile_option (line 28) | def compile_option(p): FILE: tests/sqlite_udf.py function requires_cython (line 20) | def requires_cython(method): class User (line 28) | class User(TestModel): class APIResponse (line 32) | class APIResponse(TestModel): class Generic (line 38) | class Generic(TestModel): class FixedOffset (line 46) | class FixedOffset(datetime.tzinfo): method __init__ (line 47) | def __init__(self, offset, name, dstoffset=42): method utcoffset (line 56) | def utcoffset(self, dt): method tzname (line 59) | def tzname(self, dt): method dst (line 62) | def dst(self, dt): class BaseTestUDF (line 66) | class BaseTestUDF(ModelTestCase): method sql1 (line 69) | def sql1(self, sql, *params): class TestAggregates (line 74) | class TestAggregates(BaseTestUDF): method _store_values (line 77) | def _store_values(self, *values): method mts (line 82) | def mts(self, seconds): method test_min_avg_tdiff (line 86) | def test_min_avg_tdiff(self): method test_duration (line 113) | def test_duration(self): method test_median (line 133) | def test_median(self): method test_mode (line 150) | def test_mode(self): method test_ranges (line 159) | def test_ranges(self): class TestScalarFunctions (line 179) | class TestScalarFunctions(BaseTestUDF): method test_if_then_else (line 182) | def test_if_then_else(self): method test_strip_tz (line 200) | def test_strip_tz(self): method test_human_delta (line 225) | def test_human_delta(self): method test_file_ext (line 247) | def test_file_ext(self): method test_gz (line 260) | def test_gz(self): method test_hostname (line 281) | def test_hostname(self): method test_toggle (line 314) | def test_toggle(self): method test_setting (line 324) | def test_setting(self): method test_random_range (line 338) | def test_random_range(self): method test_sqrt (line 355) | def test_sqrt(self): method test_tonumber (line 359) | def test_tonumber(self): method test_leven (line 372) | def test_leven(self): method test_str_dist (line 386) | def test_str_dist(self): method test_substr_count (line 399) | def test_substr_count(self): method test_strip_chars (line 409) | def test_strip_chars(self): FILE: tests/sqliteq.py class User (line 30) | class User(TestModel): class Meta (line 33) | class Meta: class BaseTestQueueDatabase (line 37) | class BaseTestQueueDatabase(object): method setUp (line 42) | def setUp(self): method tearDown (line 54) | def tearDown(self): method test_query_error (line 67) | def test_query_error(self): method test_integrity_error (line 73) | def test_integrity_error(self): method test_query_execution (line 78) | def test_query_execution(self): method create_thread (line 96) | def create_thread(self, fn, *args): method create_event (line 99) | def create_event(self): method test_multiple_threads (line 102) | def test_multiple_threads(self): method test_pause (line 117) | def test_pause(self): method test_restart (line 154) | def test_restart(self): method test_waiting (line 171) | def test_waiting(self): method test_next_method (line 194) | def test_next_method(self): class TestThreadedDatabaseThreads (line 211) | class TestThreadedDatabaseThreads(BaseTestQueueDatabase, BaseTestCase): method tearDown (line 214) | def tearDown(self): method create_thread (line 218) | def create_thread(self, fn, *args): method create_event (line 223) | def create_event(self): method test_timeout (line 226) | def test_timeout(self): class TestThreadedDatabaseGreenlets (line 248) | class TestThreadedDatabaseGreenlets(BaseTestQueueDatabase, BaseTestCase): method create_thread (line 253) | def create_thread(self, fn, *args): method create_event (line 256) | def create_event(self): FILE: tests/test_utils.py class Data (line 11) | class Data(TestModel): class Meta (line 14) | class Meta: class DataItem (line 17) | class DataItem(TestModel): class Meta (line 21) | class Meta: class TestQueryCounter (line 25) | class TestQueryCounter(ModelTestCase): method test_count (line 28) | def test_count(self): method test_only_select (line 44) | def test_only_select(self): method test_assert_query_count_decorator (line 61) | def test_assert_query_count_decorator(self): method test_assert_query_count_ctx_mgr (line 80) | def test_assert_query_count_ctx_mgr(self): method test_only_three (line 92) | def test_only_three(self): FILE: tests/transactions.py class BaseTransactionTestCase (line 19) | class BaseTransactionTestCase(ModelTestCase): method assertRegister (line 22) | def assertRegister(self, vals): method _save (line 26) | def _save(self, *vals): function requires_nested (line 30) | def requires_nested(fn): class TestTransaction (line 35) | class TestTransaction(BaseTransactionTestCase): method test_simple (line 36) | def test_simple(self): method test_transactions (line 65) | def test_transactions(self): method test_commit_rollback (line 96) | def test_commit_rollback(self): method test_commit_rollback_nested (line 113) | def test_commit_rollback_nested(self): method test_nesting_transaction_obj (line 123) | def test_nesting_transaction_obj(self): method test_savepoint_commit (line 158) | def test_savepoint_commit(self): method test_atomic_decorator (line 175) | def test_atomic_decorator(self): method text_atomic_exception (line 183) | def text_atomic_exception(self): method test_manual_commit (line 200) | def test_manual_commit(self): method test_mixing_manual_atomic (line 221) | def test_mixing_manual_atomic(self): method test_closing_db_in_transaction (line 243) | def test_closing_db_in_transaction(self): method test_db_context_manager (line 248) | def test_db_context_manager(self): method test_transaction_concurrency (line 279) | def test_transaction_concurrency(self): class TestSession (line 311) | class TestSession(BaseTransactionTestCase): method test_session (line 312) | def test_session(self): method test_session_with_closed_db (line 330) | def test_session_with_closed_db(self): method test_session_inside_context_manager (line 339) | def test_session_inside_context_manager(self): method test_commit_rollback_mix (line 351) | def test_commit_rollback_mix(self): method test_session_rollback (line 369) | def test_session_rollback(self): method test_session_commit (line 394) | def test_session_commit(self): class TestTransactionLockType (line 410) | class TestTransactionLockType(BaseTransactionTestCase): method test_lock_type (line 411) | def test_lock_type(self): class TestTransactionIsolationLevel (line 437) | class TestTransactionIsolationLevel(BaseTransactionTestCase): method test_isolation_level_pg (line 439) | def test_isolation_level_pg(self): method test_isolation_level_mysql (line 468) | def test_isolation_level_mysql(self): method assertDB2 (line 500) | def assertDB2(self, db2, vals):