Browse: Home / Classes /

DB_Builder

DB_Builder

This is a data mapper for CRUD


Description #

Class DB


Source #

File: includes/licensing/framework/class-db-builder.php



Methods #

  • __construct — DB_Builder constructor.
  • clear — Reset all the queries prepare after an action
  • count — Execute the query but return count.
  • exists — Run the query to see if the record is exist or not.
  • find_by_id — Find a record by it's ID
  • first — Execute the query and return the first record.
  • get — Execute the query and return the results.
  • guess_var_type — Guess the type of value for correcting placeholder
  • limit — Build the limit statement.
  • order_by — Build order statement.
  • query_build — Join the stuff on the table to make a full query statement
  • valid_operator — Validate the operator.
  • where — Define the conditions, for example where('property','value) This will create an equal statement.