Q. Which database mechanism does the Model class use internally?

  • (A) Hibernate
  • (B) MongoDB
  • (C) PDO
  • (D) JDBC
πŸ’¬ Discuss
βœ… Correct Answer: (C) PDO
Explanation: Model interacts with DB using PDO.

Q. What is the purpose of the Model class?

  • (A) Handle UI rendering
  • (B) Manage API routing
  • (C) Interact with database
  • (D) Manage logging
πŸ’¬ Discuss
βœ… Correct Answer: (C) Interact with database
Explanation: Model class provides DB interaction methods.

Q. Which class is used to make external API calls in Trishul API?

  • (A) Router
  • (B) Request
  • (C) TrishulClient
  • (D) Response
πŸ’¬ Discuss
βœ… Correct Answer: (C) TrishulClient
Explanation: TrishulClient is used to call external APIs.

Q. Which namespace contains TrishulClient?

  • (A) TrishulApi\Core\Data
  • (B) TrishulApi\Core\Http
  • (C) TrishulApi\Core\Log
  • (D) TrishulApi\Core\Model
πŸ’¬ Discuss
βœ… Correct Answer: (B) TrishulApi\Core\Http
Explanation: TrishulClient is under Core\Http namespace.

Q. Which HTTP methods are supported by TrishulClient?

  • (A) GET only
  • (B) GET, POST, PUT, DELETE
  • (C) POST only
  • (D) PATCH only
πŸ’¬ Discuss
βœ… Correct Answer: (B) GET, POST, PUT, DELETE
Explanation: Client supports standard REST methods.

Q. Which method is used to make a GET request using TrishulClient?

Code:
$client->get_mono('https://api.example.com/data');
  • (A) get()
  • (B) fetch()
  • (C) get_mono()
  • (D) request()
πŸ’¬ Discuss
βœ… Correct Answer: (C) get_mono()
Explanation: Docs specify get_mono() for GET requests.

Q. What is returned by TrishulClient methods?

  • (A) HTML page
  • (B) Response from external API
  • (C) Database object
  • (D) Router instance
πŸ’¬ Discuss
βœ… Correct Answer: (B) Response from external API
Explanation: Client returns API response.

Q. What is the main use of TrishulClient?

  • (A) Internal routing
  • (B) External API communication
  • (C) Database migration
  • (D) UI rendering
πŸ’¬ Discuss
βœ… Correct Answer: (B) External API communication
Explanation: It is used to call external APIs.

Q. Which of the following best describes Trishul Model?

  • (A) ORM like Hibernate
  • (B) Lightweight PDO-based model
  • (C) Frontend component
  • (D) Routing engine
πŸ’¬ Discuss
βœ… Correct Answer: (B) Lightweight PDO-based model
Explanation: It is a lightweight abstraction over PDO, not full ORM.

Q. Which property is mandatory in a custom model?

  • (A) $primary_key
  • (B) $table_name
  • (C) $columns
  • (D) $schema
πŸ’¬ Discuss
βœ… Correct Answer: (B) $table_name
Explanation: Table name must be defined for model to work.