Trishul API MCQs with answers Page - 9

Here, you will find a collection of MCQ questions on Trishul API . Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K Points
Coach

Q. What is the purpose of transaction() method?

  • (A) Execute single query
  • (B) Handle HTTP requests
  • (C) Wrap operations in DB transaction
  • (D) Start server

A

Admin • 833K Points
Coach

Q. What happens if exception occurs inside transaction()?

  • (A) Commit happens
  • (B) Rollback occurs
  • (C) Ignore error
  • (D) Server stops

A

Admin • 833K Points
Coach

Q. Which relationship represents one-to-many?

  • (A) belongsTo()
  • (B) hasOne()
  • (C) hasMany()
  • (D) find()

A

Admin • 833K Points
Coach

Q. Which relationship represents many-to-one?

  • (A) belongsTo()
  • (B) hasMany()
  • (C) hasOne()
  • (D) filter()

A

Admin • 833K Points
Coach

Q. Which relationship returns a single record?

  • (A) hasMany()
  • (B) hasOne()
  • (C) where()
  • (D) count()

A

Admin • 833K Points
Coach

Q. What is returned by queryBuilder()?

  • (A) PDO
  • (B) QueryBuilder instance
  • (C) Array
  • (D) Boolean

A

Admin • 833K Points
Coach

Q. Which method returns table name?

  • (A) table()
  • (B) getTableName()
  • (C) getTable()
  • (D) name()

A

Admin • 833K Points
Coach

Q. Which method returns primary key?

  • (A) primary()
  • (B) getPrimaryKey()
  • (C) key()
  • (D) id()

A

Admin • 833K Points
Coach

Q. Which method checks record count?

  • (A) exists()
  • (B) count()
  • (C) all()
  • (D) find()

A

Admin • 833K Points
Coach

Q. What condition is required for softDelete() to work?

  • (A) primary key exists
  • (B) deleted_at column exists
  • (C) table has index
  • (D) PDO enabled

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ