← 返回 openai 的题目列表In-Memory Database with Multi-Condition Query and Ordering
类型:online_judge
openai
Design an in-memory database that supports multiple query functions. The requirements are as follows:
Support basic querying.
Support querying with conditions where conditions are combined using AND.
Support querying with multiple columns conditions where conditions are combined using AND.
Support querying with conditions and order by a single column.
Support querying with conditions and order by multiple columns.
Requirements:
Implement the full functionality with a simple user interface to run queries and output results.
Provide test cases to verify functionality correctness.
Data scale: Assume the table contains up to 10,000 records, each record can contain up to 20 columns.
Test Cases:
Basic query test case.
Query with a single condition test case.
Query with multiple conditions test case.
Query with ordering functionality test case.
Comprehensive test case.
Example
Input
{"age": 28}