# -*- mode: python -*- Import("env") env = env.Clone() env.SConscript( dirs=[ 'ce', 'collation', 'cost_model', 'datetime', 'optimizer', 'stats', ], exports=[ 'env', ], ) env.Library( target='canonical_query', source=[ 'canonical_query.cpp', 'canonical_query_encoder.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/crypto/encrypted_field_config', '$BUILD_DIR/mongo/db/cst/cst', '$BUILD_DIR/mongo/db/query_expressions', 'collation/collator_factory_interface', 'collation/collator_interface', 'projection_ast', 'sort_pattern', ], LIBDEPS_PRIVATE=[ 'common_query_enums_and_helpers', ], ) env.Library( target='query_planner', source=[ 'expression_index_knobs.idl', 'expression_index.cpp', 'index_bounds_builder.cpp', 'interval_evaluation_tree.cpp', 'plan_cache_indexability.cpp', 'plan_enumerator.cpp', 'planner_access.cpp', 'planner_analysis.cpp', 'planner_ixselect.cpp', 'planner_wildcard_helpers.cpp', 'query_planner_common.cpp', 'query_planner.cpp', 'query_settings.cpp', 'query_solution.cpp', 'stage_types.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/catalog/clustered_collection_options', '$BUILD_DIR/mongo/db/exec/sbe/query_sbe_plan_stats', '$BUILD_DIR/mongo/db/index/expression_params', '$BUILD_DIR/mongo/db/query_expressions', 'canonical_query', 'query_index_bounds', 'query_knobs', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/server_status_core', '$BUILD_DIR/mongo/db/fts/base_fts', '$BUILD_DIR/mongo/db/index/key_generator', '$BUILD_DIR/mongo/db/record_id_helpers', '$BUILD_DIR/mongo/db/server_base', 'query_plan_cache', ], ) env.Library( target="query_index_bounds", source=[ "index_bounds.cpp", "index_entry.cpp", "index_tag.cpp", "interval.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/query_expressions", ], ) env.Library( target='memory_util', source=[ 'util/memory_util.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/util/pcre_wrapper', '$BUILD_DIR/mongo/util/processinfo', ], ) env.Library( target="query_plan_cache", source=[ "classic_plan_cache.cpp", "plan_cache_callbacks.cpp", "plan_cache_invalidator.cpp", "sbe_plan_cache.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/exec/sbe/query_sbe", "canonical_query", "memory_util" ], ) env.Library( target='projection_ast', source=[ 'projection.cpp', 'projection_ast_util.cpp', 'projection_parser.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/query_expressions', ], ) # Shared mongod/mongos query code. env.Library( target="query_common", source=[ "explain_common.cpp", "find_common.cpp", "parsed_distinct.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/util/fail_point", "collation/collator_factory_icu", "collation/collator_icu", "common_query_enums_and_helpers", "datetime/init_timezone_data", "query_planner", "query_request", ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/curop_failpoint_helpers', ], ) env.Library( target="common_query_enums_and_helpers", source=[ "allowed_contexts.cpp", "analyze_regex.cpp", "explain_options.cpp", "explain_verbosity.idl", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/api_parameters", "$BUILD_DIR/mongo/idl/idl_parser", ], LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/transport/transport_layer_common", ], ) env.Library( target='map_reduce_output_format', source=[ 'map_reduce_output_format.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_base', ], ) env.Library( target='cursor_response_idl', source=[ 'cursor_idl_validator.cpp', 'cursor_response.idl', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_base', '$BUILD_DIR/mongo/util/namespace_string_database_name_util', ], ) env.Library( target='command_request_response', source=[ 'analyze_command.idl', 'count_command_as_aggregation_command.cpp', 'count_command.idl', 'count_request.cpp', 'cursor_request.cpp', 'cursor_response.cpp', 'kill_cursors.idl', 'view_response_formatter.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/db/common', '$BUILD_DIR/mongo/db/ops/write_ops_parsers', '$BUILD_DIR/mongo/db/query/hint_parser', '$BUILD_DIR/mongo/db/repl/optime', '$BUILD_DIR/mongo/rpc/command_status', '$BUILD_DIR/mongo/rpc/rpc', '$BUILD_DIR/mongo/util/namespace_string_database_name_util', 'query_request', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_base', 'cursor_response_idl', ], ) env.Library( target='query_request', source=[ 'distinct_command.idl', 'find_command.idl', 'getmore_command.idl', 'query_request_helper.cpp', 'max_time_ms_parser.cpp', 'tailable_mode.cpp', 'tailable_mode.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/crypto/fle_fields', '$BUILD_DIR/mongo/db/api_parameters', '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/commands/test_commands_enabled', '$BUILD_DIR/mongo/db/pipeline/runtime_constants_idl', '$BUILD_DIR/mongo/db/repl/read_concern_args', '$BUILD_DIR/mongo/util/namespace_string_database_name_util', 'hint_parser', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_base', 'cursor_response_idl', ], ) env.Library( target='query_knobs', source=[ 'ce_mode_parameter.cpp', 'cost_model/cost_model_on_update.cpp', 'framework_control.cpp', 'query_feature_flags.idl', 'query_knobs.idl', 'sbe_plan_cache_on_parameter_change.cpp', 'telemetry_util.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_base', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/util/pcre_wrapper', 'memory_util', ], ) env.Library( target="query_test_service_context", source=[ "query_test_service_context.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/db/service_context", "$BUILD_DIR/mongo/db/session/logical_session_id", "collation/collator_factory_mock", ], LIBDEPS_PRIVATE=[], ) env.Library( target="query_planner_test_fixture", source=[ "query_planner_test_fixture.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/unittest/unittest", "query_planner_test_lib", ], ) env.Library( target="query_planner_test_lib", source=[ "query_planner_test_lib.cpp", ], LIBDEPS=[ "collation/collator_factory_mock", "query_planner", "query_test_service_context", ], ) env.Library( target='hint_parser', source=[ 'hint_parser.cpp', 'hint.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ], ) env.Library( target='sort_pattern', source=[ 'sort_pattern.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/query_expressions', ], ) env.Library( target='plan_yield_policy', source=[ 'plan_yield_policy.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/elapsed_tracker', '$BUILD_DIR/mongo/util/fail_point', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/storage/recovery_unit_base', ], ) env.Library( target='rate_limiting', source=[ 'rate_limiting.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/clock_sources', ], ) env.Library( target='telemetry', source=[ 'telemetry.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/concurrency/lock_manager', "$BUILD_DIR/mongo/rpc/client_metadata", '$BUILD_DIR/mongo/util/processinfo', 'command_request_response', 'memory_util', 'query_knobs', 'rate_limiting', ], ) env.CppUnitTest( target="db_query_test", source=[ "canonical_query_encoder_test.cpp", "canonical_query_test.cpp", "canonical_query_test_util.cpp", "ce_mode_parameter_test.cpp", "classic_stage_builder_test.cpp", "count_command_test.cpp", "cursor_response_test.cpp", "get_executor_test.cpp", "getmore_request_test.cpp", "hint_parser_test.cpp", "index_bounds_builder_collator_test.cpp", "index_bounds_builder_eq_null_test.cpp", "index_bounds_builder_interval_test.cpp", "index_bounds_builder_regex_test.cpp", "index_bounds_builder_test.cpp", "index_bounds_builder_type_test.cpp", "index_bounds_test.cpp", "index_entry_test.cpp", "interval_evaluation_tree_test.cpp", "interval_test.cpp", "killcursors_request_test.cpp", "lru_key_value_test.cpp", 'map_reduce_output_format_test.cpp', "util/memory_util_test.cpp", "parsed_distinct_test.cpp", "plan_cache_indexability_test.cpp", "plan_cache_key_info_test.cpp", "plan_cache_test.cpp", "plan_ranker_test.cpp", "planner_access_test.cpp", "planner_analysis_test.cpp", "planner_ixselect_test.cpp", "projection_ast_test.cpp", "projection_test.cpp", "query_planner_array_test.cpp", "query_planner_collation_test.cpp", "query_planner_columnar_test.cpp", "query_planner_geo_test.cpp", "query_planner_pipeline_pushdown_test.cpp", "query_planner_hashed_index_test.cpp", "query_planner_partialidx_test.cpp", "query_planner_index_test.cpp", "query_planner_operator_test.cpp", "query_planner_options_test.cpp", "query_planner_tree_test.cpp", "query_planner_text_test.cpp", "query_planner_wildcard_index_test.cpp", "query_request_test.cpp", "query_settings_test.cpp", "query_solution_test.cpp", "rate_limiting_test.cpp", "sbe_and_hash_test.cpp", "sbe_and_sorted_test.cpp", "sbe_stage_builder_accumulator_test.cpp", "sbe_stage_builder_lookup_test.cpp", "sbe_stage_builder_test.cpp", "sbe_stage_builder_test_fixture.cpp", "sbe_shard_filter_test.cpp", "shard_filterer_factory_mock.cpp", "telemetry_store_test.cpp", "view_response_formatter_test.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/db/auth/authmocks", "$BUILD_DIR/mongo/db/catalog/collection_crud", "$BUILD_DIR/mongo/db/concurrency/lock_manager", "$BUILD_DIR/mongo/db/exec/sbe/sbe_plan_stage_test", "$BUILD_DIR/mongo/db/multitenancy", "$BUILD_DIR/mongo/db/pipeline/aggregation_request_helper", "$BUILD_DIR/mongo/db/pipeline/document_source_mock", "$BUILD_DIR/mongo/db/query_exec", "$BUILD_DIR/mongo/db/repl/replmocks", "$BUILD_DIR/mongo/db/repl/storage_interface_impl", "$BUILD_DIR/mongo/db/service_context_d_test_fixture", "$BUILD_DIR/mongo/dbtests/mocklib", "$BUILD_DIR/mongo/rpc/rpc", "$BUILD_DIR/mongo/util/clock_source_mock", "collation/collator_factory_mock", "collation/collator_interface_mock", "common_query_enums_and_helpers", "hint_parser", "map_reduce_output_format", "query_common", "query_planner", "query_planner_test_fixture", "query_request", "query_test_service_context", "rate_limiting", ], ) env.Benchmark( target="sbe_expression_bm", source=[ "sbe_expression_bm.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/db/auth/authmocks", "$BUILD_DIR/mongo/db/exec/sbe/query_sbe_stages", "$BUILD_DIR/mongo/db/pipeline/expression_bm_fixture", "$BUILD_DIR/mongo/db/query_exec", "query_test_service_context", ], )