MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / init_class

Method init_class

test/perf/compiled_extensions/cache_key.py:27–113  ·  test/perf/compiled_extensions/cache_key.py::CacheKey.init_class
(cls)

Source from the content-addressed store, hash-verified

25
26 @classmethod
27 def init_class(cls):
28 cls.objects = setup_objects()
29 cls.statements = setup_statements(cls.objects)
30
31 for name in (
32 class="st">"parent_table",
33 class="st">"parent_orm",
34 class="st">"parent_orm_join",
35 class="st">"many_types",
36 ):
37 cls.make_test_cases(name, cls.statements.__dict__[name])
38
39 oracle = OracleDialect()
40 oracle.server_version_info = (21, 0, 0)
41 for name, stmt, num in (
42 (
43 class="st">"_all_objects_query",
44 oracle._all_objects_query(
45 class="st">"scott", ObjectScope.DEFAULT, ObjectKind.ANY, False, False
46 ),
47 None,
48 ),
49 (
50 class="st">"_table_options_query",
51 oracle._table_options_query(
52 class="st">"scott", ObjectScope.DEFAULT, ObjectKind.ANY, False, False
53 ),
54 None,
55 ),
56 (class="st">"_column_query", oracle._column_query(class="st">"scott"), 15_000),
57 (
58 class="st">"_comment_query",
59 oracle._comment_query(
60 class="st">"scott", ObjectScope.DEFAULT, ObjectKind.ANY, False
61 ),
62 20_000,
63 ),
64 (class="st">"_index_query", oracle._index_query(class="st">"scott"), 20_000),
65 (class="st">"_constraint_query", oracle._constraint_query(class="st">"scott"), 20_000),
66 ):
67 cls.make_test_cases(class="st">"oracle" + name, stmt, num)
68
69 pg = PGDialect()
70 pg.server_version_info = (16, 0, 0)
71 for name, stmt, num in (
72 (class="st">"_has_table_query", pg._has_table_query(class="st">"scott"), 30_000),
73 (
74 class="st">"_columns_query",
75 pg._columns_query(
76 class="st">"scott", False, ObjectScope.DEFAULT, ObjectKind.ANY
77 ),
78 10_000,
79 ),
80 (
81 class="st">"_table_oids_query",
82 pg._table_oids_query(
83 class="st">"scott", False, ObjectScope.DEFAULT, ObjectKind.ANY
84 ),

Callers

nothing calls this directly

Calls 15

_all_objects_queryMethod · 0.95
_table_options_queryMethod · 0.95
_column_queryMethod · 0.95
_comment_queryMethod · 0.95
_index_queryMethod · 0.95
_constraint_queryMethod · 0.95
_has_table_queryMethod · 0.95
_columns_queryMethod · 0.95
_table_oids_queryMethod · 0.95
_constraint_queryMethod · 0.95
_foreing_key_queryMethod · 0.95
_comment_queryMethod · 0.95

Tested by

no test coverage detected