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

Method init_class

test/perf/compiled_extensions/cache_key.py:27–113  ·  view source on GitHub ↗
(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 "parent_table",
33 "parent_orm",
34 "parent_orm_join",
35 "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 "_all_objects_query",
44 oracle._all_objects_query(
45 "scott", ObjectScope.DEFAULT, ObjectKind.ANY, False, False
46 ),
47 None,
48 ),
49 (
50 "_table_options_query",
51 oracle._table_options_query(
52 "scott", ObjectScope.DEFAULT, ObjectKind.ANY, False, False
53 ),
54 None,
55 ),
56 ("_column_query", oracle._column_query("scott"), 15_000),
57 (
58 "_comment_query",
59 oracle._comment_query(
60 "scott", ObjectScope.DEFAULT, ObjectKind.ANY, False
61 ),
62 20_000,
63 ),
64 ("_index_query", oracle._index_query("scott"), 20_000),
65 ("_constraint_query", oracle._constraint_query("scott"), 20_000),
66 ):
67 cls.make_test_cases("oracle" + name, stmt, num)
68
69 pg = PGDialect()
70 pg.server_version_info = (16, 0, 0)
71 for name, stmt, num in (
72 ("_has_table_query", pg._has_table_query("scott"), 30_000),
73 (
74 "_columns_query",
75 pg._columns_query(
76 "scott", False, ObjectScope.DEFAULT, ObjectKind.ANY
77 ),
78 10_000,
79 ),
80 (
81 "_table_oids_query",
82 pg._table_oids_query(
83 "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