jw-python/src/python/jw/util/db/query/Query.py

59 lines
1.5 KiB
Python
Raw Normal View History

from __future__ import annotations
import abc
from typing import TYPE_CHECKING, Any, cast
if TYPE_CHECKING:
from ..DataBase import DataBase
from ..Session import Session
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
from .Queries import Queries
from .QueryResult import QueryResult
class Query(abc.ABC): # export
def __init__(self, parent: Any) -> None:
self.__parent = parent
# -- pure virtuals
@abc.abstractmethod
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def _run(self, session: Session, *args: Any, **kwargs: Any) -> QueryResult:
raise Exception('Called pure virtual _run()')
@abc.abstractmethod
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def _register(self) -> None:
raise Exception('Called pure virtual _register()')
@abc.abstractmethod
def _column_names(self) -> list[str]:
raise Exception('Called pure virtual _column()')
# -- used by Queries class
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def register(self) -> None:
return self._register()
# -- to be used
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def _add(self, query_name: str, location: str, func: Any) -> None:
self.__parent.add(self, query_name, location, func)
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def run(self, session: Session, *args: Any, **kwargs: Any) -> QueryResult:
return self._run(session, *args, **kwargs)
@property
mypy: Fix disallow_incomplete_defs fallout Add parameter and return type annotations to untyped functions all over the package: - ldap.py: Add return types to Config properties (ldap_uri, bind_dn, bind_pw, base_dn), Connection.__init__, add, delete, walk, find, __oc_recurse_to_top, object_class_path, and inner callbacks - cast.py: Add Any import, add return type annotations to cast_str_to_bool, guess_type, from_str, from_env, cast_str, and parameter type annotations where missing - Table.py: - __init__ (schema: Schema) - __eq__ (rhs: Any) - _column_data_type (name: str) - _column_default (name: str) - column_default (name: str) - foreign_keys_to_parent_table (parent_table: Any) - misc.py: - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - multi_regex_edit (spec: Any) - dump_dict (*args: Any, **kwargs: Any) - get_derived_classes (mod: Any, flt: Any) - load_classes (flt: Any) - load_class_names (remove_flt: bool) - load_object (*args: Any, **kwargs: Any) - dump (*args: Any, **kwargs: Any) - MapAttr2Shape.py, ShuntingYard.py, Queries.py: - Add parameter and return type annotations to fix disallow_incomplete_defs: - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - Queries.py: _run, _register, name property, __getitem__, keys, load, add, _add - Add parameter and return type annotations: - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - auth/Auth.py: load, conf, _entity, projects - auth/ldap/Auth.py: __init__, _create_entity - Fix parameter type annotations: - rows_check_not_null: keys: str | list[str], stat_key: str | None, caller: Any - rows_dumps: lead: str | list[str] | None, tablefmt: str | None - rows_dump: heading: str | None, lead: str | list[str] | None, tablefmt: str | None - Table.py: column_default, add_row_location, add_child_row_location - CompositeForeignKey.py: __table, parent_column, child_column - TableIoHandler.py: _load, _store, load - Query.py: _register, register, parent property - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - MapAttr2Shape.py, auth/ldap/Auth.py, Query.py: - MapAttr2Shape.py: Add None check for id, add None check for graph - auth/ldap/Auth.py: Add Any import, fix __init__ and _create_entity - Query.py: Fix _add, run, parent signatures - ArgsContainer.py: __setattr__, args, kwargs, dump, specified_args, add_argument - Config.py: dump - ShuntingYard.py: Op.__init__, tokenize, infix_to_postfix, eval_postfix, eval - ShellCmd.py: __init__ - auth/Auth.py: load, __init__ - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - auth/ldap/Auth.py: Entity.__init__, Auth.__init__, _create_entity - cast.py: guess_type - DataBase.py: _create_session, _delete_session - TableIoHandler.py: load - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - rows.py: rows_duplicates, rows_check_not_null, rows_dumps, rows_dump - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ - ldap.py: Config.__get__, Config properties, Connection methods, inner callbacks - misc.py: get_derived_classes, load_classes, load_class_names, load_object, multi_regex_edit, dump_dict, dump - multi_key_dict.py: items - MapAttr2Shape.py: __keys, __attribs, __massage_node, __massage_nodes, __add - auth/dummy/Auth.py: Entity.__init__, Auth.__init__ - Query.py: _run, _register, register, _add, run, parent/db properties - QueryResult.py: pages, _cast - Column.py: __eq__, foreign_key - Schema.py: _access_defining_columns, access_defining_columns, table_by_model_name - Table.py: __init__, __eq__, _column_data_type, _column_default, column_default, __relationship_by_foreign_table, add_row_location, add_child_row_location - utils.py: check_schema - EventRouter.py: iter_peers - Group.py: __init__ - SimpleEntity.py: __init__ - Ldap.py: Entity.__init__, Ldap.__init__, _create_entity - Event.py: __init__ - Fuse.py: __init__ - Object.py: __init__ - SimpleObject.py: __init__, create - EvRequest.py: __init__ - Msg.py: __init__ Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 22:34:10 +02:00
def parent(self) -> Queries:
return cast('Queries', self.__parent)
@property
def db(self) -> DataBase:
return cast('DataBase', self.__parent.db)
@property
def schema(self) -> Any:
return self.__parent.db.schema
@property
def column_names(self) -> list[str]:
return self._column_names()